PagePropertiesExportStep implements ExportStep<Page> { @Override public void execute(Zipper zipper, Page page) throws IOException { byte[] pageProperties = pagePropertiesBuilder.build(page); zipper.addToZip(pageProperties, "page.properties"); } @Inject  PagePropertiesExportStep(PagePropertiesBuilder pagePropertiesBuilder); @Override void execute(Zipper zipper, Page page);  }
@Test public void should_add_page_properties_to_zip() throws Exception { Page page = aPage().build(); when(pagePropertiesBuilder.build(page)).thenReturn("foobar".getBytes()); step.execute(zipper, page); verify(zipper).addToZip("foobar".getBytes(), "page.properties"); }