@Test
public void should_reject_complete_manifest_when_single_object_fails_validation_with_strict_validation(){

    TrustAnchor ta = wtx(tx -> {
        TrustAnchor ta1 = factory.createTrustAnchor(tx, x -> x.roaPrefixes(Lists.newArrayList(
                RoaPrefix.of(IpRange.prefix(IpAddress.parse("192.168.0.0"), 24), 24, Asn.parse("64512"),
                        DateTime.now().minusDays(10).getMillis(),
                        DateTime.now().minusDays(2).toInstant().getMillis(),
                        TrustAnchorsFactory.nextSerial()),
                RoaPrefix.of(IpRange.prefix(IpAddress.parse("192.168.1.0"), 24), 24, Asn.parse("64513"),
                        DateTime.now().toInstant().getMillis(),
                        DateTime.now().plusYears(1).toInstant().getMillis(),
                        TrustAnchorsFactory.nextSerial())
        )));
        this.getTrustAnchors().add(tx, ta1);
        final Ref<TrustAnchor> trustAnchorRef = this.getTrustAnchors().makeRef(tx, ta1.key());
        RpkiRepository repository = this.getRpkiRepositories().register(tx, trustAnchorRef, TA_RRDP_NOTIFY_URI, RpkiRepository.Type.RRDP);
        validationScheduler.addRrdpRpkiRepository(repository);
        repository.setDownloaded();
        this.getRpkiRepositories().update(tx, repository);
        return ta1;
    });
    subject.validate(ta.key().asLong());
    List<CertificateTreeValidationRun> completed = rtx(tx -> this.getValidationRuns().findAll(tx, CertificateTreeValidationRun.class));
    assertThat(completed).hasSize(1);
    ValidationCheck check = completed.get(0).getValidationChecks().get(0);
    assertThat(check.getStatus()).isEqualTo(ValidationCheck.Status.ERROR);
    assertThat(check.getKey()).isEqualTo("cert.not.valid.after");
    List<Pair<CertificateTreeValidationRun, RpkiObject>> validatedRoas = rtx(tx -> this.getValidationRuns()
            .findCurrentlyValidated(tx, RpkiObject.Type.ROA).collect(toList()));
    assertThat(validatedRoas).hasSize(0);
}