CharPipe { public Writer getWriter() { return _pipeWriter; } CharPipe();  CharPipe(int bufferSize); void close(); void close(boolean force); Reader getReader(); Writer getWriter();  }
@Test public void testGetWriter() throws IOException { CharPipe charPipe = new CharPipe(); Writer writer1 = charPipe.getWriter(); Writer writer2 = charPipe.getWriter(); Assert.assertSame(writer1, writer2); writer1.flush(); charPipe.close(); }