### Question:
NodeLayoutGenerator { Set<String> findUnconstrainedServices() { Set<String> unconstrained = Sets.newHashSet(); Map<String, ServiceConstraint> serviceConstraints = clusterTemplate.getConstraints().getServiceConstraints(); LayoutConstraint layoutConstraint = clusterTemplate.getConstraints().getLayoutConstraint(); Set<Set<String>> mustCoexistServices = layoutConstraint.getServicesThatMustCoexist(); Set<Set<String>> mustNotCoexistServices = layoutConstraint.getServicesThatMustNotCoexist(); for (String service : clusterServices) { if (!serviceConstraints.containsKey(service) && !inSetOfSets(service, mustCoexistServices) && !inSetOfSets(service, mustNotCoexistServices)) { unconstrained.add(service); } } return unconstrained; } NodeLayoutGenerator(ClusterTemplate clusterTemplate, Set<String> clusterServices,
                             Set<String> allowedHardwareTypes, Set<String> allowedImageTypes); List<NodeLayout> generateNodeLayoutPreferences();  }### Answer:
@Test public void testGetUnconstrainedService() throws Exception { NodeLayoutGenerator nodeLayoutGenerator = new NodeLayoutGenerator(reactorTemplate2, reactorTemplate2.getClusterDefaults().getServices(), ImmutableSet.<String>of(), ImmutableSet.<String>of()); Set<String> unconstrained = nodeLayoutGenerator.findUnconstrainedServices(); Assert.assertEquals(ImmutableSet.of("hosts", "firewall"), unconstrained); }