void (final Consumer<? super MultiMap<PsiElement, String>> checkConflicts) { configureByFile(BASE_PATH + getTestName(false) + ".java"); final PsiElement targetElement = TargetElementUtil.findTargetElement(getEditor(), TargetElementUtil.ELEMENT_NAME_ACCEPTED); assertTrue("<caret> is not on member name", targetElement instanceof PsiMember); final PsiMember psiMember = (PsiMember)targetElement; final PsiClass currentClass = psiMember.getContainingClass(); assert currentClass != null; final List<MemberInfo> membersToMove = new ArrayList<>(); final PsiField fieldByName = currentClass.findFieldByName("fieldToMove", false); if (fieldByName != null) { final MemberInfo memberInfo = new MemberInfo(fieldByName); memberInfo.setChecked(true); membersToMove.add(memberInfo); } final PsiClass classByName = currentClass.findInnerClassByName("ClassToMove", false); if (classByName != null) { final MemberInfo memberInfo = new MemberInfo(classByName); memberInfo.setChecked(true); membersToMove.add(memberInfo); } final MemberInfo memberInfo = new MemberInfo(psiMember); memberInfo.setChecked(true); membersToMove.add(memberInfo); new PushDownProcessor<>(currentClass, membersToMove, new DocCommentPolicy(DocCommentPolicy.ASIS)) { @Override protected boolean showConflicts(@NotNull MultiMap<PsiElement, String> conflicts, UsageInfo[] usages) { checkConflicts.accept(conflicts); return true; } }.run(); checkResultByFile(BASE_PATH + getTestName(false) + "_after.java"); }