void (@PsiModifier.ModifierConstant @Nullable String newVisibility, @Nullable String newName, @Nullable String newReturnType, GenParams genParams, GenExceptions genExceptions, boolean generateDelegate, boolean skipConflict) { String basePath = getRelativePath() + getTestName(false); configureByFile(basePath + ".java"); PsiElement targetElement = TargetElementUtil.findTargetElement(getEditor(), TargetElementUtil.ELEMENT_NAME_ACCEPTED); if (targetElement instanceof PsiClass) { targetElement = JavaPsiRecordUtil.findCanonicalConstructor((PsiClass)targetElement); } assertTrue("<caret> is not on method name", targetElement instanceof PsiMethod); PsiMethod method = (PsiMethod)targetElement; PsiType newType = newReturnType != null ? myFactory.createTypeFromText(newReturnType, method) : method.getReturnType(); new ChangeSignatureProcessor(getProject(), method, generateDelegate, newVisibility, newName != null ? newName : method.getName(), newType, genParams.genParams(method), genExceptions.genExceptions(method)) { @Override protected boolean preprocessUsages(@NotNull Ref<UsageInfo[]> refUsages) { try { return super.preprocessUsages(refUsages); } catch (ConflictsInTestsException e) { if (skipConflict) { return true; } throw e; } } }.run(); checkResultByFile(basePath + "_after.java"); }