void () { myFixture.configureByText("Test.java", "class MyClass<T> {MyClass() {}} class UseClass {void test() {MyClass<String> obj = <caret>}}"); myFixture.complete(CompletionType.SMART); assertEquals(List.of("new MyClass"), myFixture.getLookupElementStrings()); LookupElement element = myFixture.getLookupElements()[0]; LookupElementPresentation presentation = renderElement(element); assertEquals("new MyClass", presentation.getItemText()); assertEquals("<>()", presentation.getTailText()); assertEquals("MyClass<String>", presentation.getTypeText()); myFixture.type('\n'); myFixture.checkResult("class MyClass<T> {MyClass() {}} class UseClass {void test() {MyClass<String> obj = new MyClass<>();}}"); }