Archiver { public void archive(final ByteArrayOutputStream outputStream, final String uri) throws IOException, URISyntaxException { init(outputStream, uri); zip(); } Archiver(); @Inject  Archiver(@Named("ioStrategy") IOService ioService); void archive(final ByteArrayOutputStream outputStream,
                        final String uri);  }
@Test public void testZipRepository() throws Exception { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); archiver.archive(outputStream, this.getClass().getResource("testRepository").toURI().toString()); assertZipContains(outputStream, "testRepository/project1/file1.txt", "testRepository/project2/file2.txt"); }
@Test public void testZipProject() throws Exception { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); archiver.archive(outputStream, this.getClass().getResource("testRepository/project1").toURI().toString()); assertZipContains(outputStream, "project1/file1.txt"); }