use of com.ecwid.consul.transport.RawResponse in project cloudbreak by hortonworks.
the class ConsulHostServiceTypeCheckerTaskTest method checkStatusForOneNodeResponse.
@Test
@SuppressWarnings("unchecked")
public void checkStatusForOneNodeResponse() {
ConsulRawClient raw1 = mock(ConsulRawClient.class);
RawResponse rawResponse = new RawResponse(200, null, SERVICE_RESPONSE, null, null, null);
ConsulClient client1 = new ConsulClient(raw1);
when(raw1.makeGetRequest(SERVICE_ENDPOINT + AMBARI_SERVICE, null, QueryParams.DEFAULT)).thenReturn(rawResponse);
boolean result = task.checkStatus(new ConsulContext(stack, client1, Collections.singletonList(AMBARI_SERVICE)));
assertTrue(result);
}
Aggregations