@Test public void educationOrganzationCollectionAlsoContainsSchools() { Set<String> types = resolver.resolveType("educationOrganization"); assertTrue(types.size() == 2); assertTrue(types.contains("school")); assertTrue(types.contains("educationOrganization")); types = resolver.resolveType("staff"); assertTrue(types.size() == 2); assertTrue(types.contains("teacher")); assertTrue(types.contains("staff")); types = resolver.resolveType("non-existance"); assertTrue(types.size() == 1); }
public Set<String> resolveType(String type) { if (typeMaps.containsKey(type)) { return typeMaps.get(type); } return new HashSet<String>(Arrays.asList(type)); }
TypeResolver { public Set<String> resolveType(String type) { if (typeMaps.containsKey(type)) { return typeMaps.get(type); } return new HashSet<String>(Arrays.asList(type)); } }
TypeResolver { public Set<String> resolveType(String type) { if (typeMaps.containsKey(type)) { return typeMaps.get(type); } return new HashSet<String>(Arrays.asList(type)); }  }
TypeResolver { public Set<String> resolveType(String type) { if (typeMaps.containsKey(type)) { return typeMaps.get(type); } return new HashSet<String>(Arrays.asList(type)); }  Set<String> resolveType(String type); }
TypeResolver { public Set<String> resolveType(String type) { if (typeMaps.containsKey(type)) { return typeMaps.get(type); } return new HashSet<String>(Arrays.asList(type)); }  Set<String> resolveType(String type);  }