void () { myFixture.addClass("package foo; public class Assert { public static void assertTrue() {} }"); myFixture.addClass( "package bar; @Deprecated public class Assert { public static void assertTrue() {} public static void assertTrue2() {} }"); checkPreferredItems(0, "Assert.assertTrue", "Assert.assertTrue", "Assert.assertTrue2"); LookupElementPresentation p = NormalCompletionTestCase.renderElement(myFixture.getLookup().getItems().get(0)); assertTrue(p.getTailText().contains("foo")); assertFalse(p.isStrikeout()); p = NormalCompletionTestCase.renderElement(myFixture.getLookup().getItems().get(1)); assertTrue(p.getTailText().contains("bar")); assertTrue(p.isStrikeout()); }