void () { String expectedTypeName = "Path"; doTest(new MockIntroduceVariableHandler("path", true, false, false, expectedTypeName) { @Override public IntroduceVariableSettings getSettings(Project project, Editor editor, PsiExpression expr, PsiExpression[] occurrences, TypeSelectorManagerImpl typeSelectorManager, boolean declareFinalIfAll, boolean anyAssignmentLHS, InputValidator validator, PsiElement anchor, final JavaReplaceChoice replaceChoice) { final PsiType type = typeSelectorManager.getDefaultType(); assertEquals(type.getPresentableText(), expectedTypeName, type.getPresentableText()); assertEquals("path", CommonJavaRefactoringUtil.getSuggestedName(type, expr).names[0]); return super.getSettings(project, editor, expr, occurrences, typeSelectorManager, declareFinalIfAll, anyAssignmentLHS, validator, anchor, replaceChoice); } }); }