@Test
public void should_register_rpki_repositories() {

    TrustAnchor ta = factory.createRipeNccTrustAnchor();
    wtx(tx -> this.getTrustAnchors().add(tx, ta));
    subject.validate(ta.key().asLong());
    List<CertificateTreeValidationRun> completed = rtx(tx -> this.getValidationRuns().findAll(tx, CertificateTreeValidationRun.class));
    assertThat(completed).hasSize(1);
    CertificateTreeValidationRun result = completed.get(0);
    assertThat(result.getStatus()).isEqualTo(SUCCEEDED);
    rtx0(tx -> {
        final List<RpkiRepository> all = this.getRpkiRepositories().findAll(tx, ta.key()).collect(toList());
        assertEquals(RpkiRepository.Status.PENDING, all.get(0).getStatus());
        assertEquals("https://rrdp.ripe.net/notification.xml", all.get(0).getLocationUri());
        assertThat(ta.isInitialCertificateTreeValidationRunCompleted()).as("trust anchor initial validation run completed").isFalse();
        assertThat(this.getSettings().isInitialValidationRunCompleted(tx)).as("validator initial validation run completed").isFalse();
    });
}