void () { PsiPackage psiPackage = mySource.createPackage("pkg"); JUnitConfiguration configuration = createJUnitConfiguration(psiPackage, AllInPackageConfigurationProducer.class, new MapDataContext()); rename(psiPackage, "pkg2"); checkPackage("pkg2", configuration); PsiPackage outer = mySource.createPackage("outerPkg"); move(JavaPsiFacade.getInstance(myProject).findPackage("pkg2"), outer.getQualifiedName()); checkPackage("outerPkg.pkg2", configuration); rename(outer, "outer2"); checkPackage("outer2.pkg2", configuration); }