use of se.riv.clinicalprocess.healthcond.certificate.sendMessageToCare.v2.SendMessageToCareResponseType in project webcert by sklintyg.
the class SendMessageToCareResponderImplTest method testSendRequestToServiceFailedExternalServiceProblem.
@Test
public void testSendRequestToServiceFailedExternalServiceProblem() throws WebCertServiceException {
when(arendeService.processIncomingMessage(any())).thenThrow(new WebCertServiceException(WebCertServiceErrorCodeEnum.EXTERNAL_SYSTEM_PROBLEM, ""));
SendMessageToCareResponseType response = responder.sendMessageToCare(DEFAULT_LOGICAL_ADDRESS, createNewRequest());
assertNotNull(response.getResult());
assertEquals(ResultCodeType.ERROR, response.getResult().getResultCode());
assertEquals(ErrorIdType.VALIDATION_ERROR, response.getResult().getErrorId());
}
Aggregations