TrackingOutputStream extends OutputStream { public OutputStream getWrappedStream() { return wrappedStream; } TrackingOutputStream( final OutputStream wrapped ); void write( final int b ); void write( final byte[] b ); void write( final byte[] b, final int off, final int len ); void flush(); void close(); OutputStream getWrappedStream(); int getTrackingSize();  }
@Test public void testGetStream() throws Exception { assertEquals( outputStream, streamSpy.getWrappedStream() ); }