ProjectGraph { public Set<String> getAllCUTsParents(String aClass) throws IllegalArgumentException { checkClass(aClass); Set<String> set = null; try{ set = inheritanceTree.getSuperclasses(aClass); } catch(Exception e){ logger.error("Bug in inheritanceTree: "+e); return new HashSet<>(); } set.remove(aClass); removeNonCUT(set); return set; } ProjectGraph(ProjectStaticData data); Set<String> getCUTsDirectlyUsedAsInput(String cut, boolean includeSubclasses); Set<String> getCUTsThatUseThisCUTasInput(String cut,
			boolean includeSuperClasses); boolean isInterface(String className); boolean isConcrete(String className); boolean isAbstract(String className); Set<String> getAllCUTsSubclasses(String aClass); Set<String> getAllCUTsParents(String aClass);  }
@Test public void testGetAllCUTsParents() { ProjectStaticData data = new ProjectStaticData(); data.addNewClass(new ClassInfo(A.class, 1, true)); data.addNewClass(new ClassInfo(B.class, 1, true)); data.addNewClass(new ClassInfo(C.class, 0, false)); data.addNewClass(new ClassInfo(D.class, 0, false)); data.addNewClass(new ClassInfo(E.class, 1, true)); data.addNewClass(new ClassInfo(F.class, 0, false)); data.addNewClass(new ClassInfo(G.class, 1, true)); ProjectGraph graph = data.getProjectGraph(); Set<String> forA = graph.getAllCUTsParents(A.class.getName()); Set<String> forB = graph.getAllCUTsParents(B.class.getName()); Set<String> forC = graph.getAllCUTsParents(C.class.getName()); Set<String> forD = graph.getAllCUTsParents(D.class.getName()); Set<String> forE = graph.getAllCUTsParents(E.class.getName()); Set<String> forF = graph.getAllCUTsParents(F.class.getName()); Set<String> forG = graph.getAllCUTsParents(G.class.getName()); Assert.assertEquals(0, forA.size()); Assert.assertEquals(1, forB.size()); Assert.assertEquals(0, forC.size()); Assert.assertEquals(0, forD.size()); Assert.assertEquals(0, forE.size()); Assert.assertEquals(0, forF.size()); Assert.assertEquals(1, forG.size()); }