void () { PsiClass psiClass = mySource.createClass("Application", APPLICATION_CODE); assertNotNull(psiClass); ApplicationConfiguration configuration = createConfiguration(psiClass); move(psiClass, "pkg"); try { configuration.checkConfiguration(); } catch (RuntimeConfigurationException e) { fail("Unexpected ConfigurationException: " + e); } assertEquals("pkg.Application", configuration.getMainClassName()); rename(JavaPsiFacade.getInstance(myProject).findPackage("pkg"), "pkg2"); assertEquals("pkg2.Application", configuration.getMainClassName()); }