EventTriggerWriter { public void close() throws IOException { writer.close(); } EventTriggerWriter(Writer writer, String documentText); Writer getFileWriter(); void setFileWriter(Writer writer); void writeTrigger(EventTrigger trigger); void close(); boolean isWritten(EventTrigger trigger);  }
@Test public void testClose() throws IOException{ writer.close(); replay(writer); eventTriggerWriter.close(); verify(writer); }