startKey.rowValue.put(1);
writer.writeEntry(startKey);
writer.writeEntry(startKey);
is = new ByteArrayInputStream (os.toByteArray());
KeyReader reader = new KeyReader (is);
SortKey endKey = reader.readNext();
assertTrue (startKey.rowValue.get().equals(endKey.rowValue.get()));
assertTrue (startKey.sortKeys.get(0).compareTo(endKey.sortKeys.get(0)) == 0);
endKey = reader.readNext();
assertTrue (startKey.rowValue.get().equals(endKey.rowValue.get()));
assertTrue (startKey.sortKeys.get(0).compareTo(endKey.sortKeys.get(0)) == 0);
endKey = reader.readNext();
assertNull (endKey);
}