Collections.sort(rowKeys);
Collections.sort(encodedRowKeys, UnsignedBytes.lexicographicalComparator());
for (int i = 0; i < rowKeys.size(); i++) {
RowKey rowKey = rowKeys.get(i);
byte[] encodedRowKey = encodedRowKeys.get(i);
Assert.assertArrayEquals(encodedRowKey, rowKey.encode());
}
}