    @Test
    public void test_empty_file() throws IOException {

        TrustAnchor ta = createRipeNccTrustAnchor();
        wtx0(tx -> trustAnchors.add(tx, ta));

        ta.setLocations(ImmutableList.of(new ClassPathResource("empty-file.cer").getURI().toString()));
        wtx0(tx -> trustAnchors.update(tx, ta));
        subject.validate(ta.key().asLong());

        X509ResourceCertificate certificate = rtx(tx -> trustAnchors.get(tx, ta.key()).get().getCertificate());
        assertThat(certificate).isNull();

        Optional<TrustAnchorValidationRun> validationRun = rtx(tx -> validationRuns.findLatestCompletedForTrustAnchor(tx, ta));
        assertThat(validationRun).isPresent();

        List<ValidationCheck> validationChecks = validationRun.get().getValidationChecks();
        assertThat(validationChecks).hasSize(1);
        assertThat(validationChecks.get(0).getKey()).isEqualTo(ErrorCodes.REPOSITORY_OBJECT_MINIMUM_SIZE);
    }