HspReader { public static void stream(final Readable readable, final HspListener listener) throws IOException { checkNotNull(readable); checkNotNull(listener); HspLineProcessor lineProcessor = new HspLineProcessor(listener); CharStreams.readLines(readable, lineProcessor); } private  HspReader(); static Iterable<HighScoringPair> read(final Readable readable); static void stream(final Readable readable, final HspListener listener);  }
@Test(expected=NullPointerException.class) public void testStreamNullReadable() throws Exception { stream(null, new HspListener() { @Override public boolean hsp(final HighScoringPair hsp) { return true; } }); }
@Test(expected=NullPointerException.class) public void testStreamNullListener() throws Exception { stream(readable, null); }
@Test public void testStream() throws Exception { stream(readable, new HspListener() { @Override public boolean hsp(final HighScoringPair hsp) { assertNotNull(hsp); return true; } }); }