void () { final String filePath = BASE_PATH + "/" + getTestName(false) + ".java"; configureByFile(filePath); PsiNewExpression newWithAnonym = PsiTreeUtil.getParentOfType(getFile().findElementAt(getEditor().getCaretModel().getOffset()), PsiNewExpression.class); ExpectedTypeInfo[] types = ExpectedTypesProvider.getExpectedTypes(newWithAnonym, false); assertNotNull(types); doTestConfiguredFile(false, false, filePath); }