void () { PsiClass psiClass = mySource.createClass("ATest", TEST_CODE); assertNotNull(psiClass); PsiMethod testMethod = psiClass.findMethodsByName("test", false)[0]; JUnitConfiguration configuration = createConfiguration(testMethod); rename(testMethod, "test1"); checkMethodName("test1", configuration); checkClassName("ATest", configuration); assertEquals("ATest.test1", configuration.getName()); move(psiClass, "pkg"); checkClassName("pkg.ATest", configuration); psiClass = configuration.getConfigurationModule().findClass(configuration.getPersistentData().getMainClassName()); rename(psiClass, "TestClassName"); assertEquals("TestClassName.test1", configuration.getName()); psiClass = configuration.getConfigurationModule().findClass(configuration.getPersistentData().getMainClassName()); PsiClass otherTest = mySource.createClass("ATest", TEST_CODE); HashSet<PsiMember> members = new HashSet<>(); assertNotNull(psiClass); members.add(psiClass.findMethodsByName("test1", false)[0]); moveMembers(otherTest, members); psiClass = configuration.getConfigurationModule().findClass(configuration.getPersistentData().getMainClassName()); checkMethodName("test1", configuration); checkClassName("ATest", configuration); assertEquals("ATest.test1", configuration.getName()); assertNotNull(psiClass); PsiMethod otherMethod = psiClass.findMethodsByName("otherMethod", false)[0]; rename(otherMethod, "newName"); checkMethodName("test1", configuration); }