DocumentWriter { public void close() throws IOException { writer.close(); } DocumentWriter(Writer writer); void write(JCas cas); void close();  }
@Test public void testClose() throws IOException{ writer.close(); replay(writer); documentWriter.close(); verify(writer); }