### Question:
ServiceCreator { public DeployableService createService(DeployableServiceSpec serviceSpec) throws ServiceNotCreatedException { try { service = new DeployableService(serviceSpec); service.generateUUID(); } catch (IllegalArgumentException e1) { logger.error("Could not create service " + serviceSpec.getName()); throw new ServiceNotCreatedException(serviceSpec.getName()); } Set<CloudNode> selectedNodes = prepareDeployment(); service.setSelectedNodes(selectedNodes); logger.info("Created service " + service); return service; } ServiceCreator(); DeployableService createService(DeployableServiceSpec serviceSpec);  }### Answer:
@Test public void shouldReturnAValidService() throws PrepareDeploymentFailedException, ServiceNotCreatedException { DeployableService service = serviceCreator.createService(serviceSpec); assertEquals(serviceSpec.getName(), service.getSpec().getName()); String uuid = service.getUUID(); assertTrue(uuid != null && !uuid.isEmpty()); assertEquals(service.getSelectedNodes().iterator().next(), node); ServiceDeploymentPreparerFactory.testing = false; }