public void validate(String effectivePath, String artifactMD5, ChecksumValidationPublisher checksumValidationPublisher) {
        if (artifactMd5Checksums == null) {
            checksumValidationPublisher.md5ChecksumFileNotFound();
            return;
        }
        String expectedMd5 = artifactMd5Checksums.md5For(effectivePath);
        if (StringUtils.isBlank(expectedMd5)) {
            checksumValidationPublisher.md5NotFoundFor(effectivePath);
            return;
        }
        if (expectedMd5.equals(artifactMD5)) {
            checksumValidationPublisher.md5Match(effectivePath);
        } else {
            checksumValidationPublisher.md5Mismatch(effectivePath);
        }
    }
@Test
    public void shouldCallbackWhenMd5IsNotFound() throws IOException {
        when(checksums.md5For("path")).thenReturn(null);

        final ByteArrayInputStream stream = new ByteArrayInputStream("foo".getBytes());
        new ChecksumValidator(checksums).validate("path", CachedDigestUtils.md5Hex(stream), checksumValidationPublisher);

        verify(checksumValidationPublisher).md5NotFoundFor("path");
    }