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