use of io.confluent.ksql.rest.entity.ConnectorList in project ksql by confluentinc.
the class CliTest method shouldIssueCCloudConnectorRequest.
@Test
public void shouldIssueCCloudConnectorRequest() throws Exception {
// Given:
final KsqlRestClient mockRestClient = givenMockRestClient();
when(mockRestClient.getIsCCloudServer()).thenReturn(true);
when(mockRestClient.getHasCCloudApiKey()).thenReturn(true);
when(mockRestClient.makeConnectorRequest(anyString(), anyLong())).thenReturn(RestResponse.successful(OK.code(), new KsqlEntityList(Collections.singletonList(new ConnectorList("list connectors;", Collections.emptyList(), Collections.emptyList())))));
// When:
localCli.handleLine("list connectors;");
// Then:
verify(mockRestClient).makeConnectorRequest(anyString(), anyLong());
}
Aggregations