void (final String newClassName, final boolean makeStatic) { configureByFile(TEST_ROOT + getTestName(true) + ".java"); AnonymousToInnerHandler handler = new AnonymousToInnerHandler() { @Override protected boolean showRefactoringDialog() { myNewClassName = newClassName; myMakeStatic = makeStatic; for (VariableInfo info : myVariableInfos) { info.parameterName = info.fieldName = info.variable.getName(); } return true; } }; handler.invoke(getProject(), getEditor(), getFile(), null); checkResultByFile(TEST_ROOT + getTestName(true) + "_after.java"); }