@Test
public void should_register_rsync_repositories() {

    TrustAnchor ta = wtx(tx -> {
        TrustAnchor trustAnchor = factory.createTrustAnchor(tx, x -> {
            x.notifyURI(null);
            x.repositoryURI(TA_CA_REPOSITORY_URI);
        });
        this.getTrustAnchors().add(tx, trustAnchor);
        return trustAnchor;
    });
    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 -> {
        assertThat(this.getRpkiRepositories().findAll(tx, ta.key())).first().extracting(
                RpkiRepository::getStatus,
                RpkiRepository::getLocationUri
        ).containsExactly(
                RpkiRepository.Status.PENDING,
                TA_CA_REPOSITORY_URI
        );
        assertThat(ta.isInitialCertificateTreeValidationRunCompleted()).as("trust anchor initial validation run completed").isFalse();
        assertThat(this.getSettings().isInitialValidationRunCompleted(tx)).as("validator initial validation run completed").isFalse();
    });
}