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 noOverlapForComputedAndProvidedChecksums() {
        final Exception ex = assertThrows(Exception.class, () -> UpdateCenter.verifyChecksums(
                new MockDownloadJob(EMPTY_SHA1, EMPTY_SHA256, null),
                buildEntryWithExpectedChecksums(null, null, EMPTY_SHA512), new File("example")));
        assertEquals("Unable to confirm integrity of downloaded file, refusing installation", ex.getMessage());
    }