### Question:
ServerOutputStream extends UnicastExportable implements RemoteOutputStream, Closeable { public void flush() throws IOException { out.flush(); } ServerOutputStream(OutputStream out, Exporter exporter); void write(int b); void write(byte[] b); void write(PartialBuffer b); void flush(); void close(); @Override void unreferenced();  }### Answer:
@Test public void testFlush() throws IOException { final boolean[] flushed = new boolean[] { false }; OutputStream out = new OutputStream() { @Override public void flush() { flushed[0] = true; } @Override public void write(int b) throws IOException { } }; ServerOutputStream so = new ServerOutputStream(out, exporter); assertFalse(flushed[0]); so.flush(); assertTrue(flushed[0]); }