Assert.assertEquals(operation.getForwardedEndpoint(), returnedSoapOperation.getForwardedEndpoint()); Assert.assertEquals(operation.getResponseStrategy(), returnedSoapOperation.getResponseStrategy()); Assert.assertEquals(operation.getSimulateNetworkDelay(), returnedSoapOperation.getSimulateNetworkDelay()); Assert.assertEquals(operation.getNetworkDelay(), returnedSoapOperation.getNetworkDelay()); Assert.assertEquals(operation.getCurrentResponseSequenceIndex(), returnedSoapOperation.getCurrentResponseSequenceIndex());
if(soapOperation.getSimulateNetworkDelay() && soapOperation.getNetworkDelay() >= 0){ try {
/** * The process message is responsible for processing an incoming serviceTask and generate * a response based on the incoming serviceTask input * @param serviceTask The serviceTask that will be processed by the service * @return A result based on the processed incoming serviceTask * @see ServiceTask * @see ServiceResult */ @Override public ServiceResult<UpdateSoapOperationOutput> process(final ServiceTask<UpdateSoapOperationInput> serviceTask) { final UpdateSoapOperationInput input = serviceTask.getInput(); final SoapOperation updated = input.getOperation(); final SoapOperation soapOperation = this.operationRepository.findOne(input.getOperationId()); soapOperation.setStatus(updated.getStatus()); soapOperation.setForwardedEndpoint(updated.getForwardedEndpoint()); soapOperation.setResponseStrategy(updated.getResponseStrategy()); soapOperation.setSimulateNetworkDelay(updated.getSimulateNetworkDelay()); soapOperation.setNetworkDelay(updated.getNetworkDelay()); soapOperation.setDefaultMockResponseId(updated.getDefaultMockResponseId()); soapOperation.setMockOnFailure(updated.getMockOnFailure()); soapOperation.setIdentifyStrategy(updated.getIdentifyStrategy()); final SoapOperation updatedSoapOperation = this.operationRepository.update(input.getOperationId(), soapOperation); return createServiceResult(UpdateSoapOperationOutput.builder() .operation(updatedSoapOperation) .build()); } }