TeeOutputStream extends OutputStream { @Override public void write(final byte[] b) throws IOException { original.write(b); branch.write(b); }  @Override void write(final byte[] b); @Override void write(final byte[] b, final int off, final int len); @Override void write(final int b); @Override void flush(); @Override void close();  }
@Test void shouldWriteInt() throws IOException { unit.write(0); verify(first).write(0); verify(second).write(0); }
@Test void shouldWriteArray() throws IOException { unit.write(new byte[0]); verify(first).write(new byte[0]); verify(second).write(new byte[0]); }
@Test void shouldWriteArrayWithOffset() throws IOException { unit.write(new byte[0], 0, 0); verify(first).write(new byte[0], 0, 0); verify(second).write(new byte[0], 0, 0); }