void (String sourceClassName, String targetClassName, int[] memberIndices, final String visibility) { PsiClass sourceClass = myFixture.findClass(sourceClassName); PsiClass targetClass = myFixture.findClass(targetClassName); PsiElement[] children = sourceClass.getChildren(); ArrayList<PsiMember> members = new ArrayList<>(); for (PsiElement child : children) { if (child instanceof PsiMember) { members.add(((PsiMember) child)); } } LinkedHashSet<PsiMember> memberSet = new LinkedHashSet<>(); for (int index : memberIndices) { PsiMember member = members.get(index); assertTrue(member.hasModifierProperty(PsiModifier.STATIC)); memberSet.add(member); } MockMoveMembersOptions options = new MockMoveMembersOptions(targetClass.getQualifiedName(), memberSet); options.setMemberVisibility(visibility); new MoveMembersProcessor(getProject(), null, options).run(); }