@Test(expected = CloudRuntimeException.class)
public void putHostInMaintenanceTestExceptionThrownAtMaintain() throws AgentUnavailableException {

    setupPutHostInMaintenance(false);
    Mockito.doThrow(AgentUnavailableException.class).when(resourceManager).maintain(Mockito.anyLong());
    administrationAgent.putHostInMaintenance(0l);
    verifyPutHostInMaintenanceCalledMethods(0, 0);
}