void () { String name = getTestName(false); configureByFile(BASE_DIR + "before" + name + ".java"); int offset = getEditor().getCaretModel().getOffset(); PsiElement context = getFile().findElementAt(offset); PsiMethod psiMethod = PsiTreeUtil.getParentOfType(context, PsiMethod.class); assert psiMethod != null; final PsiClass aClass = psiMethod.getContainingClass(); assert aClass != null && aClass.isEnum(); final PsiField[] fields = aClass.getFields(); new ImplementAbstractMethodHandler(getProject(), getEditor(), psiMethod).implementInClass(fields); checkResultByFile(BASE_DIR + "after" + name + ".java"); }