@Test
public void testFetchTrustAnchorCertificate_reject_http() throws Exception {

    given(trustAnchorRetrievalService.fetchTrustAnchorCertificate(any(), any())).willCallRealMethod();
    final URI uri = URI.create("http://rpki.example.org/ta/ta.cer");
    trustAnchorRetrievalService.fetchTrustAnchorCertificate(uri, validationResult);
    final List<ValidationCheck> validationChecks = validationResult.getAllValidationChecksForCurrentLocation();
    assertThat(validationChecks).hasSize(1);
    assertThat(validationChecks.get(0).getKey()).isEqualTo(ErrorCodes.TRUST_ANCHOR_FETCH);
}