byte [] theBytes = new byte[bytes.length + 1 + utf8Bytes.length];
System.arraycopy(bytes, 0, theBytes, 0, bytes.length);
theBytes[bytes.length] = (byte)utf8Str.length();//Add in the number of chars we are storing, which should fit in a byte for this test
System.arraycopy(utf8Bytes, 0, theBytes, bytes.length + 1, utf8Bytes.length);
IndexInput is = new MockIndexInput(theBytes);
assertEquals(128, is.readVInt());
assertEquals(16383, is.readVInt());
assertEquals(16384, is.readVInt());
assertEquals(16385, is.readVInt());
int charsToRead = is.readVInt();//number of chars in the Lucene string
assertTrue(0x06 + " does not equal: " + charsToRead, 0x06 == charsToRead);