@Test
public void testComplete() throws Exception {

  handler = new StagingHandler( outputStream, StagingMode.MEMORY, session );
  handler.complete();
  verify( outputStream, times( 1 ) ).write( any( byte[].class ), anyInt(), anyInt() );
  verify( outputStream, times( 1 ) ).flush();
}