Search in sources :

Example 1 with ApiBatchResponseElement

use of com.cloudera.api.swagger.model.ApiBatchResponseElement in project cloudbreak by hortonworks.

the class ClouderaManagerModificationServiceTest method setUpBatchSuccess.

private void setUpBatchSuccess() throws ApiException {
    setUpBatchWithResponseAnswer(invocation -> {
        ApiBatchRequest batchRequest = invocation.getArgument(0, ApiBatchRequest.class);
        int responseItemCount = batchRequest.getItems().size();
        ApiBatchResponse batchResponse = new ApiBatchResponse().success(true).items(new ArrayList<>());
        for (int i = 0; i < responseItemCount; i++) {
            batchResponse.addItemsItem(new ApiBatchResponseElement());
        }
        return batchResponse;
    });
}
Also used : ApiBatchResponseElement(com.cloudera.api.swagger.model.ApiBatchResponseElement) ApiBatchResponse(com.cloudera.api.swagger.model.ApiBatchResponse) ApiBatchRequest(com.cloudera.api.swagger.model.ApiBatchRequest)

Aggregations

ApiBatchRequest (com.cloudera.api.swagger.model.ApiBatchRequest)1 ApiBatchResponse (com.cloudera.api.swagger.model.ApiBatchResponse)1 ApiBatchResponseElement (com.cloudera.api.swagger.model.ApiBatchResponseElement)1