### Question:
ClientOutputStream extends OutputStream { @Override public void flush() throws IOException { remote.flush(); } ClientOutputStream(RemoteOutputStream out); @Override void close(); @Override void flush(); @Override void write(int b); @Override void write(byte[] buf); @Override void write(byte[] buf, int off, int len);  }### Answer:
@Test public void testFlush() throws IOException { final boolean[] flushed = new boolean[] { false }; ByteArrayOutputStream bo = new ByteArrayOutputStream() { @Override public void flush() { flushed[0] = true; } }; ServerOutputStream so = new ServerOutputStream(bo, exporter); ClientOutputStream co = new ClientOutputStream((RemoteOutputStream) so.getExported()); assertFalse(flushed[0]); co.flush(); assertTrue(flushed[0]); co.close(); }