void (@Nullable String expectedErrorMessage) { String filePath = BASE_PATH + "/" + getTestName(false) + ".java"; configureByFile(filePath); final PsiClass psiClass = getJavaFacade().findClass("Foo", GlobalSearchScope.projectScope(getProject())); assertNotNull("Class Foo not found", psiClass); final String errorMessage = LambdaHighlightingUtil.checkInterfaceFunctional(getJavaFacade().getElementFactory().createType(psiClass)); assertEquals(expectedErrorMessage, errorMessage); }