use of se.inera.intyg.webcert.web.service.intyg.converter.IntygModuleFacadeException in project webcert by sklintyg.
the class IntygServiceRevokeTest method testRevokeIntygThatHasAlreadyBeenRevokedFails.
@Test(expected = WebCertServiceException.class)
public void testRevokeIntygThatHasAlreadyBeenRevokedFails() throws IntygModuleFacadeException {
when(moduleFacade.getCertificate(anyString(), anyString())).thenThrow(new IntygModuleFacadeException(""));
// Do the call
try {
intygService.revokeIntyg(INTYG_ID, INTYG_TYP_FK, REVOKE_MSG, REVOKE_REASON);
} finally {
verifyZeroInteractions(certificateSenderService);
verify(intygRepository, times(0)).save(any(Utkast.class));
verifyZeroInteractions(notificationService);
verifyZeroInteractions(logService);
}
}
Aggregations