ResourceTypeManager { public List<ResourceType<L>> getResourceTypesBreadthFirst() { List<ResourceType<L>> result = new ArrayList<ResourceType<L>>(); GraphIterator<ResourceType<L>, DefaultEdge> it = new BreadthFirstIterator<ResourceType<L>, DefaultEdge>( this.resourceTypesGraph); while (it.hasNext()) { result.add(it.next()); } return Collections.unmodifiableList(result); } ResourceTypeManager(Collection<ResourceType<L>> allTypes);  ResourceTypeManager(Map<Name, TypeSet<ResourceType<L>>> resourceTypeSetMap, Collection<Name> setsToUse); List<ResourceType<L>> getResourceTypesBreadthFirst(); Set<ResourceType<L>> getRootResourceTypes(); Set<ResourceType<L>> getChildren(ResourceType<L> resourceType); Set<ResourceType<L>> getParents(ResourceType<L> resourceType);  }
@Test public void disabledAllTypesDMR() { ResourceType<DMRNodeLocation> rt1_1 = createResourceTypeDMR("res1_1", "/res1_1=*"); TypeSet<ResourceType<DMRNodeLocation>> set1 = createResourceTypeSetDMR("set1", false, rt1_1); ResourceType<DMRNodeLocation> rt2_1 = createResourceTypeDMR("res2_1", "/res2_1=*", rt1_1.getName()); TypeSet<ResourceType<DMRNodeLocation>> set2 = createResourceTypeSetDMR("set2", false, rt2_1); ResourceType<DMRNodeLocation> rt3_1 = createResourceTypeDMR("res3_1", "/res3_1=*", rt2_1.getName()); TypeSet<ResourceType<DMRNodeLocation>> set3 = createResourceTypeSetDMR("set3", true, rt3_1); ResourceType<DMRNodeLocation> rt4_1 = createResourceTypeDMR("res4_1", "/res4_1=*", rt3_1.getName()); TypeSet<ResourceType<DMRNodeLocation>> set4 = createResourceTypeSetDMR("set4", true, rt4_1); Map<Name, TypeSet<ResourceType<DMRNodeLocation>>> rTypeSetDmrMap = new HashMap<>(); rTypeSetDmrMap.put(set1.getName(), set1); rTypeSetDmrMap.put(set2.getName(), set2); rTypeSetDmrMap.put(set3.getName(), set3); rTypeSetDmrMap.put(set4.getName(), set4); ResourceTypeManager<DMRNodeLocation> rtm = new ResourceTypeManager<>(rTypeSetDmrMap, null); Assert.assertTrue("There should be no enabled types", rtm.getResourceTypesBreadthFirst().isEmpty()); }