@Test
public void testChangeState_IOException() throws Exception {

	this.msgClient.connected.set( false );
	Assert.assertEquals( 0, this.msgClient.allSentMessages.size());
	Assert.assertEquals( 0, this.ma.removeAwaitingMessages( this.app.getTomcatVm()).size());
	String instancePath = InstanceHelpers.computeInstancePath( this.app.getTomcat());
	Response resp = this.resource.changeInstanceState( this.app.getName(), InstanceStatus.DEPLOYED_STARTED.toString(), instancePath );
	Assert.assertEquals( Status.FORBIDDEN.getStatusCode(), resp.getStatus());
	Assert.assertEquals( 0, this.msgClient.allSentMessages.size());
	List<Message> messages = this.ma.removeAwaitingMessages( this.app.getTomcatVm());
	Assert.assertEquals( 0, messages.size());
}