void (final PsiClass aClass, final ArrayList<PsiMethod> methods, final ArrayList<PsiField> fields, final String conflicts, boolean generateGettersSetters, boolean inner) { try { ExtractClassProcessor processor = new ExtractClassProcessor(aClass, fields, methods, new ArrayList<>(), StringUtil.getPackageName(aClass.getQualifiedName()), null, "Extracted", null, generateGettersSetters, Collections.emptyList(), inner); processor.run(); } catch (BaseRefactoringProcessor.ConflictsInTestsException e) { if (conflicts != null) { TreeSet expectedConflictsSet = new TreeSet(Arrays.asList(conflicts.split("\n"))); TreeSet actualConflictsSet = new TreeSet(Arrays.asList(e.getMessage().split("\n"))); Assert.assertEquals(expectedConflictsSet, actualConflictsSet); return; } else { fail(e.getMessage()); } } if (conflicts != null) { fail("Conflicts were not detected: " + conflicts); } }