compareDigest unit testing