OntologyUtil { public String getUnclassifiedParentIri(OntologyHierarchy hierarchy) { return hierarchy.getIri().replace(UNCLASSIFIED_IRI_APPEND,""); } 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 testGetUnclassifiedParentIri() { OntologyHierarchy hierarchyMock = mock(OntologyHierarchy.class); when(hierarchyMock.getIri()).thenReturn(""); assertEquals("", uut.getUnclassifiedParentIri(hierarchyMock)); when(hierarchyMock.getIri()).thenReturn("http: assertEquals("http: when(hierarchyMock.getIri()).thenReturn("http: assertEquals("http: when(hierarchyMock.getIri()).thenReturn("http: assertEquals("http: }