void () { configureByFile("/codeInsight/generate/generateCreateUI/beforeSOE.java"); final PsiClass targetClass = PsiTreeUtil.getParentOfType(getFile().findElementAt(getEditor().getCaretModel().getOffset()), PsiClass.class); assertNotNull(targetClass); assertFalse(new GenerateCreateUIAction().isValidForClass(targetClass)); }