@Test
public void findActiveVersion_whenACaDoesNotExist_throwsException() {

  when(certificateVersionDataService.findActive(any(String.class))).thenReturn(null);
  try {
    certificateAuthorityService.findActiveVersion("any ca name");
  } catch (final EntryNotFoundException pe) {
    assertThat(pe.getMessage(), equalTo(ErrorMessages.Credential.CERTIFICATE_ACCESS));
  }
}