### Question:
ServiceDefinitionsLoader { public static Set<ServiceDefinition> getServiceDefinitions(File servicesDir) { final Set<ServiceDefinition> services = new TreeSet<>(new ServiceDefinitionComparator()); loadServiceDefinitions(servicesDir).forEach(serviceDefinitionPair -> services.add(serviceDefinitionPair.getService())); return services; }  static Set<ServiceDeploymentContributor> loadServiceDefinitionDeploymentContributors(File servicesDir); static Set<ServiceDefinitionPair> loadServiceDefinitions(File servicesDir); static Set<ServiceDefinition> getServiceDefinitions(File servicesDir); static UrlRewriteRulesDescriptor loadRewriteRules(File servicesDir);  }### Answer:
@Test public void shouldReturnLoadedServiceDefinitionsOrdered() throws Exception { final URL url = ClassLoader.getSystemResource("services"); final Set<ServiceDefinition> serviceDefinitions = ServiceDefinitionsLoader.getServiceDefinitions(new File(url.getFile())); Assert.assertTrue(CollectionUtils.isSorted(serviceDefinitions, new ServiceDefinitionComparator())); }