InsertHelper { public DrawFillBitmap createDrawFillImage(final OdsDocument document, final InputStream sourceStream, final String name, final String href) throws IOException { final byte[] bytes = FileUtil.create().readStream(sourceStream); document.addExtraFile(href, this.getMediaType(href), bytes); return new DrawFillBitmap(name, href); } InsertHelper(final FileUtil fileUtil); static InsertHelper create(); void insertImage(final OdsDocument document, final Table table, final String frameName,
                            final File source, final String destName, final SVGRectangle rectangle); void insertImage(final OdsDocument document, final Table table, final String frameName,
                            final InputStream sourceStream, final String destName,
                            final SVGRectangle rectangle); DrawFillBitmap createDrawFillImage(final OdsDocument document,
                                              final InputStream sourceStream, final String name,
                                              final String href); void insertObject(final OdsDocument document, final Table table, final String frameName,
                             final String objectName, final String objectMediaType,
                             final String objectVersion, final InputStream sourceStream,
                             final SVGRectangle rectangle, final GraphicStyle gs);  }
@Test public void testCreateDrawFillImage() throws IOException { PowerMock.resetAll(); this.document.addExtraFile("ref", "image/ref", new byte[0]); PowerMock.replayAll(); this.ih.createDrawFillImage(this.document, new ByteArrayInputStream(new byte[0]), "name", "ref"); PowerMock.verifyAll(); }