ZooKeeperDeployer { public void deploy(ApplicationPackage applicationPackage, Map<Version, FileRegistry> fileRegistryMap, AllocatedHosts allocatedHosts) throws IOException { zooKeeperClient.setupZooKeeper(); zooKeeperClient.write(applicationPackage); zooKeeperClient.write(fileRegistryMap); zooKeeperClient.write(allocatedHosts); } ZooKeeperDeployer(ZooKeeperClient client); void deploy(ApplicationPackage applicationPackage, Map<Version, FileRegistry> fileRegistryMap, 
                       AllocatedHosts allocatedHosts); void cleanup();  }
@Test public void require_that_deployer_is_initialized() throws IOException { ConfigCurator zkfacade = ConfigCurator.create(new MockCurator()); File serverdbDir = folder.newFolder("serverdb"); File defsDir = new File(serverdbDir, "serverdefs"); try { IOUtils.createWriter(new File(defsDir, defFile), true); } catch (IOException e) { e.printStackTrace(); fail(); } deploy(FilesApplicationPackage.fromFile(new File("src/test/apps/content")), zkfacade, Path.fromString("/1")); deploy(FilesApplicationPackage.fromFile(new File("src/test/apps/content")), zkfacade, Path.fromString("/2")); }