@Test
public void test_success() throws IOException {

    TrustAnchor ta = createRipeNccTrustAnchor();
    wtx0(tx -> trustAnchors.add(tx, ta));
    ta.setLocations(ImmutableList.of(new ClassPathResource("ripe-ncc-ta.cer").getURI().toString()));
    subject.validate(ta.key().asLong());
    X509ResourceCertificate certificate = rtx(tx -> trustAnchors.get(tx, ta.key()).get().getCertificate());
    assertThat(certificate).isNotNull();
    Optional<TrustAnchorValidationRun> validationRun = rtx(tx -> validationRuns.findLatestCompletedForTrustAnchor(tx, ta));
    assertThat(validationRun).isPresent();
    assertThat(validationRun.get().getStatus()).isEqualTo(ValidationRun.Status.SUCCEEDED);
    assertThat(validationRun.get().getValidationChecks()).isEmpty();
}