void () { myFixture.configureByText("a.java", """ class SomeOuterClassWithLongName { void foo(PropertyDescriptorWithVeryLongName.Group group, PropertyDescriptorWithVeryLongName.Group child) { group.add<caret>SubGroup(child); } static class PropertyDescriptorWithVeryLongName { static class Group { } } } """); TemplateManagerImpl.setTemplateTesting(getTestRootDisposable()); doAction("Create method 'addSubGroup' in 'Group in PropertyDescriptorWithVeryLongName in SomeOuterClassWithLongName'"); TemplateState state = TemplateManagerImpl.getTemplateState(getEditor()); //skip void return type state.nextTab(); // parameter type final LookupEx lookup = LookupManager.getActiveLookup(getEditor()); final LookupElement item = (lookup == null ? null : lookup.getCurrentItem()); assertTrue((item == null ? null : item.getLookupString()).endsWith("Group")); myFixture.type("\n"); // parameter name, skip it final LookupEx lookup1 = LookupManager.getActiveLookup(getEditor()); final LookupElement item1 = (lookup1 == null ? null : lookup1.getCurrentItem()); assertEquals("child", (item1 == null ? null : item1.getLookupString())); state.nextTab(); assertTrue(state.isFinished()); myFixture.checkResult(""" class SomeOuterClassWithLongName { void foo(PropertyDescriptorWithVeryLongName.Group group, PropertyDescriptorWithVeryLongName.Group child) { group.addSubGroup(child); } static class PropertyDescriptorWithVeryLongName { static class Group { public void addSubGroup(Group child) { <selection></selection> } } } } """); }