### Question:
CommitOutputStream extends OutputStream { public void rollback() { m_size = 0; } CommitOutputStream(OutputStream sink); void write(int data); void write(byte buffer[], int offset, int length); int getSize(); void commit(); void rollback(); void flush(); void close();  }### Answer:
@Test public void rollback() throws IOException { m_fixture.write(10); assertEquals(1, m_fixture.getSize()); m_fixture.rollback(); assertEquals(0, m_fixture.getSize()); m_fixture.commit(); m_fixture.flush(); assertEquals(0, m_result.available()); }