void () { myFixture.configureByText("Test.java", "class MyClass {MyClass() {}} class UseClass {void test() {MyClass 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()); myFixture.type('\n'); myFixture.checkResult("class MyClass {MyClass() {}} class UseClass {void test() {MyClass obj = new MyClass();}}"); }