void (boolean preSelect) { String name = getTestName(false); myFixture.configureByFile("before" + name + ".java"); new GenerateConstructorHandler() { @Override protected ClassMember[] chooseMembers(ClassMember[] members, boolean allowEmpty, boolean copyJavadoc, Project project, Editor editor) { if (preSelect) { List<ClassMember> preselection = GenerateConstructorHandler.preselect(members); return preselection.toArray(ClassMember.EMPTY_ARRAY); } else { return members; } } }.invoke(getProject(), getEditor(), getFile()); myFixture.checkResultByFile("after" + name + ".java"); }