public void testReloadChanged() {
RootModuleDefinition parentSpec1 = ModificationTestUtils.spec("app-context1.xml", "plugin1, plugin2, plugin3");
RootModuleDefinition parentSpec2 = ModificationTestUtils.spec("app-context1.xml", "plugin1, plugin2");
parentSpec2.findChildDefinition("plugin1", true).setState(ModuleState.STALE);
TransitionSet transitions = calculator.getTransitions(application, parentSpec1, parentSpec2);
assertEquals(parentSpec2, transitions.getNewRootModuleDefinition());
Collection<? extends ModuleStateChange> moduleTransitions = transitions.getModuleTransitions();
assertEquals(3, moduleTransitions.size());
Iterator<? extends ModuleStateChange> iterator = moduleTransitions.iterator();
ModuleStateChange change1 = iterator.next();
ModuleStateChange change2 = iterator.next();