### Question:
ServiceDependencyMatrixService { public ServiceDependencyMatrix collectServiceDependencyMatrix(Set<String> services, String stackType, String version) { ServiceDependencyMatrix serviceDependencyMatrix = new ServiceDependencyMatrix(); Services servicesObject = new Services(); servicesObject.setServices(services); serviceDependencyMatrix.setServices(servicesObject); Dependencies dependencies = new Dependencies(); Set<String> deps = new HashSet<>(); for (String service : services) { for (ServiceConfig serviceInformation : resolver.serviceConfigs()) { if (service.toUpperCase().equals(serviceInformation.getName())) { for (String dependency : serviceInformation.getDependencies()) { deps.add(dependency.toUpperCase()); } break; } } } dependencies.setServices(deps); serviceDependencyMatrix.setDependencies(dependencies); return serviceDependencyMatrix; }  ServiceDependencyMatrix collectServiceDependencyMatrix(Set<String> services, String stackType, String version);  }### Answer:
@Test public void test() { ServiceDependencyMatrix serviceDependencyMatrix = serviceDependencyMatrixService() .collectServiceDependencyMatrix(inputs, stackType, version); Assert.assertEquals(dependencies, serviceDependencyMatrix.getDependencies().getServices()); Assert.assertEquals(inputs, serviceDependencyMatrix.getServices().getServices()); }