OntologyUtil { public void buildIriToAttrMap(String ontologyAttr) { JSONObject map = jsonUtil.getObject(ontologyAttr); for (String key : map.keySet()) { String value = jsonUtil.getString(map, key); iriToAttrMap.put(key, value); } } private  OntologyUtil(); static OntologyUtil getInstance(); boolean createIriToAttrMap(List<OntologyHierarchy> result); boolean isValidIriMap(List<OntologyHierarchy> hierarchies); void buildIriToAttrMap(String ontologyAttr); OntologyHierarchyNameComparator getOntologyNameComparator(); void addUnclassifiedChild(List<OntologyHierarchy> children); OntologyHierarchy addUnclassifiedChild(OntologyHierarchy child); boolean isUnclassified(OntologyHierarchy hierarchy); String getUnclassifiedParentIri(OntologyHierarchy hierarchy); String getAttr(OntologyHierarchy hierarchy); Avu convertHierarchyToAvu(OntologyHierarchy hierarchy); AvuList convertHierarchiesToAvus(OntologyHierarchy hierarchy); AvuList convertHierarchiesToAvus(List<OntologyHierarchy> selectedHierarchies); List<String> getPathList(OntologyHierarchy hierarchy); List<List<String>> getAllPathsList(List<OntologyHierarchy> hierarchies); String getOrCreateHierarchyPathTag(OntologyHierarchy hierarchy); AvuList getBetaAvuList(); Avu getBetaAvu(); AvuList removeBetaAvu(List<Avu> result); OntologyHierarchy getHierarchyObject();  }
@Test public void testBuildIriToAttrMap() { when(jsonUtilMock.getObject("rdf:type")).thenReturn(mapMock); uut.buildIriToAttrMap("rdf:type"); verify(jsonUtilMock).getObject(anyString()); verify(mapMock).keySet(); verify(jsonUtilMock, times(2)).getString(eq(mapMock), anyString()); verify(iriToAttrMapMock, times(2)).put(anyString(), anyString()); }