### Question:
WorkItemDefinitionDeployServices { @SuppressWarnings("all") public void deploy(final Metadata metadata) { final Path root = metadata.getRoot(); final Path deployedPath = getDeployedRoot(metadata); final Path path = null != deployedPath ? deployedPath : root; synchronized (path) { if (null == getDeployedRoot(metadata)) { deployed.put(root.toURI(), root); deployServices.forEach(s -> s.deploy(metadata)); } } } protected  WorkItemDefinitionDeployServices(); @Inject  WorkItemDefinitionDeployServices(final @Any Instance<WorkItemDefinitionDeployService> deployServices);   WorkItemDefinitionDeployServices(final Iterable<WorkItemDefinitionDeployService> deployServices,
                                     final Map<String, Path> deployed); @SuppressWarnings("all") void deploy(final Metadata metadata);  }### Answer:
@Test public void testDeploy() { tested.deploy(METADATA1); tested.deploy(METADATA2); tested.deploy(METADATA1); tested.deploy(METADATA2); verify(service1, times(1)).deploy(eq(METADATA1)); verify(service2, times(1)).deploy(eq(METADATA1)); verify(service1, times(1)).deploy(eq(METADATA2)); verify(service2, times(1)).deploy(eq(METADATA2)); }