use of com.cloud.legacymodel.communication.command.CheckHealthCommand in project cosmic by MissionCriticalCloud.
the class NiciraCheckHealthCommandWrapperTest method tetsExecuteWhenApiThrowsException.
@Test
public void tetsExecuteWhenApiThrowsException() throws Exception {
when(niciraApi.getControlClusterStatus()).thenThrow(NiciraNvpApiException.class);
final NiciraCheckHealthCommandWrapper commandWrapper = new NiciraCheckHealthCommandWrapper();
final Answer answer = commandWrapper.execute(new CheckHealthCommand(), niciraResource);
assertThat(answer.getResult(), equalTo(false));
}
Aggregations