private static VerificationResult verifyChecksums(String expectedDigest, String actualDigest, boolean caseSensitive) {
        if (expectedDigest == null) {
            return VerificationResult.NOT_PROVIDED;
        }

        if (actualDigest == null) {
            return VerificationResult.NOT_COMPUTED;
        }

        if (caseSensitive) {
            if (MessageDigest.isEqual(expectedDigest.getBytes(StandardCharsets.US_ASCII), actualDigest.getBytes(StandardCharsets.US_ASCII))) {
                return VerificationResult.PASS;
            }
        } else {
            if (MessageDigest.isEqual(expectedDigest.toLowerCase().getBytes(StandardCharsets.US_ASCII), actualDigest.toLowerCase().getBytes(StandardCharsets.US_ASCII))) {
                return VerificationResult.PASS;
            }
        }

        return VerificationResult.FAIL;
    }
@Test
    public void sha1Mismatch() {
        final IOException ex = assertThrows(IOException.class, () -> UpdateCenter.verifyChecksums(
                new MockDownloadJob(EMPTY_SHA1.replace('k', 'f'), null, null),
                buildEntryWithExpectedChecksums(EMPTY_SHA1, null, null), new File("example")));
        assertTrue(ex.getMessage().contains("does not match expected SHA-1, expected '2jmj7l5rSw0yVb/vlWAYkK/YBwk=', actual '2jmj7l5rSw0yVb/vlWAYfK/YBwf='"));
    }