void () { myFixture.configureByText("a.java", "\nclass Foo { \n void foo(int a, int b) {\n Stri<caret>\n bar();\n }\n \n void bar(int a, int b) {} \n}"); myFixture.completeBasic(); myFixture.assertPreferredCompletionItems(0, "String"); myFixture.type("\n");// increase String statistics myFixture.type("foo;\nbar("); myFixture.completeBasic(); myFixture.assertPreferredCompletionItems(0, "a", "b", "a, b"); }