void () { myFixture.configureByText("Test.java", """ public class Test { abstract static class Foo<T> { Foo() {} } static class Bar extends Foo<String> {Bar() {}} public static void main(String[] args) { Foo<String> foo = <caret> } }"""); myFixture.complete(CompletionType.SMART, 2); assertEquals(List.of("new Bar"), myFixture.getLookupElementStrings()); myFixture.type('\n'); myFixture.checkResult(""" public class Test { abstract static class Foo<T> { Foo() {} } static class Bar extends Foo<String> {Bar() {}} public static void main(String[] args) { Foo<String> foo = new Bar(); } }"""); }