public void testEncodedSortability() {
Random random = newRandom();
byte[] originalArray1 = new byte[MAX_RANDOM_BINARY_LENGTH];
ByteBuffer originalBuf1 = ByteBuffer.wrap(originalArray1);
char[] originalString1 = new char[MAX_RANDOM_BINARY_LENGTH];
CharBuffer originalStringBuf1 = CharBuffer.wrap(originalString1);
char[] encoded1 = new char[IndexableBinaryStringTools.getEncodedLength(originalBuf1)];
CharBuffer encodedBuf1 = CharBuffer.wrap(encoded1);
byte[] original2 = new byte[MAX_RANDOM_BINARY_LENGTH];
ByteBuffer originalBuf2 = ByteBuffer.wrap(original2);
char[] originalString2 = new char[MAX_RANDOM_BINARY_LENGTH];
CharBuffer originalStringBuf2 = CharBuffer.wrap(originalString2);
char[] encoded2 = new char[IndexableBinaryStringTools.getEncodedLength(originalBuf2)];
CharBuffer encodedBuf2 = CharBuffer.wrap(encoded2);
for (int testNum = 0 ; testNum < NUM_RANDOM_TESTS ; ++testNum) {
int numBytes1 = random.nextInt(MAX_RANDOM_BINARY_LENGTH - 1) + 1; // Min == 1
originalBuf1.limit(numBytes1);
originalStringBuf1.limit(numBytes1);