void () { configureByFile(TEST_ROOT + getTestName(true) + ".java"); AnonymousToInnerHandler handler = new AnonymousToInnerHandler(){ @Override protected boolean showRefactoringDialog() { myNewClassName = "MyPredicate"; myMakeStatic = !needsThis(); return true; } }; handler.invoke(getProject(), getEditor(), getFile(), null); assertFalse(handler.needsThis()); checkResultByFile(TEST_ROOT + getTestName(true) + "_after.java"); }