ThruStagingHandler extends AbstractStagingHandler { @Override public void complete() { } ThruStagingHandler( final OutputStream outputStream, final IPentahoSession userSession ); @Override void complete(); @Override void close(); @Override int getWrittenByteCount(); @Override boolean canSendHeaders(); @Override OutputStream getStagingOutputStream(); @Override boolean isFullyBuffered(); @Override StagingMode getStagingMode();  }
@Test public void testComplete() throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ThruStagingHandler handler = new ThruStagingHandler( baos, session ); handler.getStagingOutputStream().write( TEST.getBytes() ); handler.complete(); assertEquals( "Write output only after complete", TEST, baos.toString().trim() ); }