Tomcat7CommitSessionOutputBuffer implements OutputBuffer { @Override public long getBytesWritten() { return delegate.getBytesWritten(); } Tomcat7CommitSessionOutputBuffer(final SessionCommitter sessionCommitter,
      final OutputBuffer delegate); @Override int doWrite(final ByteChunk chunk, final Response response); @Override long getBytesWritten();  }
@Test public void getBytesWritten() { when(delegate.getBytesWritten()).thenReturn(42L); assertThat(commitSesssionOutputBuffer.getBytesWritten()).isEqualTo(42L); final InOrder inOrder = inOrder(sessionCommitter, delegate); inOrder.verify(delegate).getBytesWritten(); inOrder.verifyNoMoreInteractions(); }