void () { myFixture.addClass( "\nclass ContainerUtilRt {\n static void newHashSet();\n static void newHashSet2();\n}\nclass ContainerUtil extends ContainerUtilRt {\n static void newHashSet();\n static void newHashSet3();\n}\n"); checkPreferredItems(0, "newHashSet", "newHashSet", "newHashSet3", "newHashSet2"); assertEquals("ContainerUtil", ((PsiMethod)myFixture.getLookupElements()[0].getPsiElement()).getContainingClass().getName()); }