@Test
public void test_rsync_failure() {

    TrustAnchor ta = createRipeNccTrustAnchor();
    ta.setLocations(ImmutableList.of(DUMMY_RSYNC_URI));
    wtx0(tx -> trustAnchors.add(tx, ta));
    subject.validate(ta.key().asLong());
    assertThat(ta.getCertificate()).isNull();
    Optional<TrustAnchorValidationRun> validationRun = rtx(tx -> validationRuns.findLatestCompletedForTrustAnchor(tx, ta));
    assertThat(validationRun).isPresent();
    List<ValidationCheck> validationChecks = validationRun.get().getValidationChecks();
    assertThat(validationChecks).hasSize(2);
    assertThat(validationChecks).anyMatch(vc -> vc.getKey().equals(ErrorCodes.RSYNC_FETCH));
    assertThat(validationChecks).anyMatch(vc -> vc.getKey().equals(ErrorCodes.TRUST_ANCHOR_FETCH));
}