@Test
public void test_stopIsPropagatedToChildren_stopped() throws Exception {

	IAgentClient messagingClient = Mockito.mock( IAgentClient.class );
	WaitingForAncestor wfa = new WaitingForAncestor( "app", messagingClient );
	TestApplication app = new TestApplication();
	app.getTomcatVm().setStatus( InstanceStatus.DEPLOYED_STARTED );
	app.getTomcat().setStatus( InstanceStatus.WAITING_FOR_ANCESTOR );
	app.getWar().setStatus( InstanceStatus.DEPLOYED_STOPPED );
	wfa.changeInstanceState( app.getTomcat(), null, InstanceStatus.DEPLOYED_STOPPED, null );
	Mockito.verifyZeroInteractions( messagingClient );
	Assert.assertEquals( InstanceStatus.DEPLOYED_STARTED, app.getTomcatVm().getStatus());
	Assert.assertEquals( InstanceStatus.DEPLOYED_STOPPED, app.getTomcat().getStatus());
	Assert.assertEquals( InstanceStatus.DEPLOYED_STOPPED, app.getWar().getStatus());
}