OdsFileWriterAdapter implements NamedOdsFileWriter { @Override public synchronized void update(final OdsAsyncFlusher flusher) { this.flushers.add(flusher); this.logger.fine("Add new flusher: " + flusher); this.notifyAll(); } OdsFileWriterAdapter(final Logger logger, final NamedOdsFileWriter adaptee,
                         final Queue<OdsAsyncFlusher> flushers); static OdsFileWriterAdapter create(final Logger logger,
                                              final NamedOdsFileWriter adaptee); @Override void close(); @Override NamedOdsDocument document(); @Override synchronized void save(); @Override synchronized void update(final OdsAsyncFlusher flusher); synchronized void flushAdaptee(); synchronized boolean isNotStopped(); synchronized void waitForData();  }
@Test public void testUpdate() { PowerMock.resetAll(); this.logger .fine("Add new flusher: EasyMock for interface com.github.jferard.fastods" + ".OdsAsyncFlusher"); PowerMock.replayAll(); this.wa.update(this.f); PowerMock.verifyAll(); Assert.assertEquals(Collections.singletonList(this.f), this.flushers); }