@Test public void testFlush() { try { stream.flush(); fail("Expected exception not thrown."); } catch (final IOException e) { assertEquals(exception, e); } }
@Override public void flush() throws IOException { throw exception; }
BrokenOutputStream extends OutputStream { @Override public void flush() throws IOException { throw exception; } }
BrokenOutputStream extends OutputStream { @Override public void flush() throws IOException { throw exception; } BrokenOutputStream(final IOException exception);  BrokenOutputStream(); }
BrokenOutputStream extends OutputStream { @Override public void flush() throws IOException { throw exception; } BrokenOutputStream(final IOException exception);  BrokenOutputStream(); @Override void write(final int b); @Override void flush(); @Override void close(); }
BrokenOutputStream extends OutputStream { @Override public void flush() throws IOException { throw exception; } BrokenOutputStream(final IOException exception);  BrokenOutputStream(); @Override void write(final int b); @Override void flush(); @Override void close();  }