@Test
public void testResynchronize_success() throws ApplicationWsException {

	final Collection<Instance> rootInstances = this.app.getRootInstances();
	// Deploy & start everything.
	for(Instance i : rootInstances)
		i.setStatus( InstanceStatus.DEPLOYED_STARTED );
	// Request an application resynchronization.
	this.client.getApplicationDelegate().resynchronize( this.app.getName() );
	// Check a MsgCmdResynchronize has been sent to each agent.
	final List<Message> sentMessages = this.msgClient.allSentMessages;
	Assert.assertEquals( rootInstances.size(), sentMessages.size() );
	for( Message message : sentMessages )
		Assert.assertTrue( message instanceof MsgCmdResynchronize );
}