Tomcat8CommitSessionOutputBuffer implements OutputBuffer { @Deprecated @Override public int doWrite(final ByteChunk chunk) throws IOException { sessionCommitter.commit(); return delegate.doWrite(chunk); } Tomcat8CommitSessionOutputBuffer(final SessionCommitter sessionCommitter,
      final OutputBuffer delegate); @Deprecated @Override int doWrite(final ByteChunk chunk); @Override int doWrite(final ByteBuffer chunk); @Override long getBytesWritten();  }
@Deprecated @Test public void doWrite() throws IOException { final ByteChunk byteChunk = new ByteChunk(); commitSesssionOutputBuffer.doWrite(byteChunk); final InOrder inOrder = inOrder(sessionCommitter, delegate); inOrder.verify(sessionCommitter).commit(); inOrder.verify(delegate).doWrite(byteChunk); inOrder.verifyNoMoreInteractions(); }
@Test public void testDoWrite() throws IOException { final ByteBuffer byteBuffer = ByteBuffer.allocate(0); commitSesssionOutputBuffer.doWrite(byteBuffer); final InOrder inOrder = inOrder(sessionCommitter, delegate); inOrder.verify(sessionCommitter).commit(); inOrder.verify(delegate).doWrite(byteBuffer); inOrder.verifyNoMoreInteractions(); }