OdsFactory { public AnonymousOdsFileWriter createWriter() { final AnonymousOdsDocument document = this.createAnonymousDocument(); return new AnonymousOdsFileWriter(this.logger, document); } OdsFactory(final Logger logger, final PositionUtil positionUtil, final WriteUtil writeUtil,
               final XMLUtil xmlUtil, final Map<String, String> additionalNamespaceByPrefix,
               final DataStyles format, final boolean libreOfficeMode,
               final MetaElement metaElement); static OdsFactoryBuilder builder(final Logger logger, final Locale locale); static OdsFactory create(); static OdsFactory create(final Logger logger, final Locale locale); @Deprecated OdsFactory dataStyles(final DataStyles ds); @Deprecated OdsFactory noLibreOfficeMode(); @Deprecated OdsFactory metaElement(final MetaElement metaElement); @Deprecated OdsFactory addNamespaceByPrefix(final Map<String, String> additionalNamespaceByPrefix); AnonymousOdsFileWriter createWriter(); NamedOdsFileWriter createWriter(final String filename); NamedOdsFileWriter createWriter(final File file); OdsFileWriterAdapter createWriterAdapter(final File file);  }
@Test public void createWriter() throws Exception { PowerMock.resetAll(); this.logger.log(Level.FINE, "file saved"); PowerMock.replayAll(); final NamedOdsFileWriter writer = this.odsFactory.createWriter(this.file.getAbsolutePath()); writer.save(); writer.close(); PowerMock.verifyAll(); Assert.assertTrue(this.file.length() > 0); }
@Test public void createWriter1() throws Exception { PowerMock.resetAll(); PowerMock.replayAll(); this.odsFactory.createWriter(this.file); PowerMock.verifyAll(); }