### Question:
LineageStreamingOutput implements StreamingOutput { @Override public void write( OutputStream outputStream ) throws IOException, WebApplicationException { lineageCollector.compressArtifacts( artifacts, outputStream ); outputStream.flush(); } LineageStreamingOutput( List<String> artifacts, ILineageCollector lineageCollector ); @Override void write( OutputStream outputStream );  }### Answer:
@Test public void testWrite() throws Exception { List<String> artifacts = new ArrayList<>(); LineageStreamingOutput stream = new LineageStreamingOutput( artifacts, collector ); stream.write( outputStream ); verify( collector ).compressArtifacts( eq( artifacts ), eq( outputStream ) ); verify( outputStream ).flush(); }