void () { myFixture.addClass("class Super {}"); myFixture.addClass("class Sub extends Super {}"); myFixture.addClass("package foo; public class SubOther {}"); myFixture.configureByText("a.java", "class C { Super s = new SubO<caret>x }"); myFixture.completeBasic(); myFixture.assertPreferredCompletionItems(0, "SubOther"); myFixture.type('\b'); myFixture.assertPreferredCompletionItems(0, "Sub"); myFixture.type('O'); myFixture.assertPreferredCompletionItems(0, "SubOther"); }