public void testOneRecord() throws SnapshotStoreException {
MockDocumentSnapshot before = new MockDocumentSnapshot("0", "0.extra");
writeAndClose(writer, before);
SnapshotReader reader =
new SnapshotReader(new BufferedReader(new StringReader(sw.toString())),
"test", 8, new MockDocumentSnapshotFactory());
DocumentSnapshot after = reader.read();
assertEquals(before, after);
assertNull(reader.read());
}