Search in sources :

Example 6 with SendMessageToCareResponseType

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());
}
Also used : SendMessageToCareResponseType(se.riv.clinicalprocess.healthcond.certificate.sendMessageToCare.v2.SendMessageToCareResponseType) WebCertServiceException(se.inera.intyg.webcert.common.service.exception.WebCertServiceException) Test(org.junit.Test)

Aggregations

SendMessageToCareResponseType (se.riv.clinicalprocess.healthcond.certificate.sendMessageToCare.v2.SendMessageToCareResponseType)6 Test (org.junit.Test)5 WebCertServiceException (se.inera.intyg.webcert.common.service.exception.WebCertServiceException)5 Arende (se.inera.intyg.webcert.persistence.arende.model.Arende)1 ResultType (se.riv.clinicalprocess.healthcond.certificate.v3.ResultType)1