void () { myFixture.configureByFile(getTestName(false) + ".java"); PsiElement elementAtCaret = myFixture.getElementAtCaret(); assertTrue(elementAtCaret instanceof PsiParameter); WriteCommandAction.runWriteCommandAction(getProject(), () -> { PsiTypeElement typeElement = (PsiTypeElement)JavaCodeStyleManager.getInstance(getProject()).shortenClassReferences(((PsiParameter)elementAtCaret).getTypeElement()); assertTrue(typeElement.isValid()); assertEquals("List<String>", typeElement.getText()); }); myFixture.checkResultByFile(getTestName(false) + "_after.java"); }