ParseSampleStream extends FilterObjectStream<String, Parse> { public Parse read() throws IOException { String parse = samples.read(); if (parse != null) { return Parse.parseParse(parse); } else { return null; } } ParseSampleStream(ObjectStream<String> in); Parse read();  }
@Test public void testReadTestStream() throws IOException { ObjectStream<Parse> parseStream = createParseSampleStream(); assertNotNull(parseStream.read()); assertNotNull(parseStream.read()); assertNotNull(parseStream.read()); assertNotNull(parseStream.read()); assertNull(parseStream.read()); }