use of org.onap.so.apihandler.common.RequestClientParameter in project so by onap.
the class ResumeOrchestrationRequestTest method resumeRequestTest.
@Test
public void resumeRequestTest() throws ApiException, IOException {
Response response = null;
doReturn(instanceIdMap).when(resumeReq).setInstanceIdMap(infraActiveRequest, ModelType.service.toString());
doReturn(SERVICE_INSTANCE_NAME).when(resumeReq).getInstanceName(infraActiveRequest, ModelType.service.toString(), currentActiveRequest);
when(requestHandler.convertJsonToServiceInstanceRequest(anyString(), any(Actions.class), anyString(), anyString())).thenReturn(sir);
when(serviceInstances.getPnfCorrelationId(any(ServiceInstancesRequest.class))).thenReturn("pnfCorrelationId");
doReturn(lookupResult).when(requestHandler).getServiceInstanceOrchestrationURI(sir, action, aLaCarte, currentActiveRequest);
doReturn(requestClientParameter).when(resumeReq).setRequestClientParameter(lookupResult, version, infraActiveRequest, currentActiveRequest, "pnfCorrelationId", aLaCarte, sir);
doNothing().when(resumeReq).requestDbSave(currentActiveRequest);
when(requestHandler.postBPELRequest(any(InfraActiveRequests.class), any(RequestClientParameter.class), anyString(), anyString())).thenReturn(response);
doNothing().when(resumeReq).checkForInProgressRequest(currentActiveRequest, instanceIdMap, SERVICE, SERVICE_INSTANCE_NAME, action);
resumeReq.resumeRequest(infraActiveRequest, currentActiveRequest, version, "/onap/so/infra/orchestrationRequests/v7/requests/00032ab7-na18-42e5-965d-8ea592502018/resume");
verify(requestHandler).postBPELRequest(currentActiveRequest, requestClientParameter, lookupResult.getOrchestrationURI(), infraActiveRequest.getRequestScope());
}
Aggregations