Bug 36578 call hierarchy: Needs more test cases
The call hierarchy view needs more test cases.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/CallHierarchyTest.java
IPackageFragment pack2= root2.createPackageFragment("pack2", true, null);
        
        ICompilationUnit cu2= pack2.getCompilationUnit("B.java");
        IType type2= cu2.createType("public class B extends pack1.A {public void method3() { method1(); }\n}\n", null, true, null);
        IMethod method1= type1.getMethod("method1", new String[0]);
        
        Collection expectedMethods= new ArrayList();
        expectedMethods.add(type1.getMethod("method2", new String[0]));
        expectedMethods.add(type2.getMethod("method3", new String[0]));
        
        MethodWrapper wrapper= CallHierarchy.getDefault().getCallerRoot(method1);
        MethodWrapper[] uncachedCalls= wrapper.getCalls();
        assertCalls(expectedMethods, uncachedCalls);
        
        MethodWrapper[] cachedCalls= wrapper.getCalls();
        assertCalls(expectedMethods, cachedCalls);
    }
    private void assertCalls(
        Collection expectedMethods,
        MethodWrapper[] callResults) {
        Collection calls= Arrays.asList(callResults);
        Collection foundMethods= new ArrayList();
        for (int i= 0; i < callResults.length; i++) {
            foundMethods.add(callResults[i].getMember());
        } 
        assertEquals("Wrong number of callers", expectedMethods.size(), calls.size());
        assertTrue("One or more methods not found", foundMethods.containsAll(expectedMethods));
    }   
}