TeeOutputStream extends OutputStream { @Override public void flush() throws IOException { original.flush(); branch.flush(); }  @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 shouldFlush() throws IOException { unit.flush(); verify(first).flush(); verify(second).flush(); }