@Test
void testDefaultDigestFactory() throws Exception
{

    assertThat(factory.getInstance(MD5_DIGEST_ALGO.getEncoded()).digest(BYTES), equalTo(md5Digest));
    assertThat(factory.getInstance(SHA1_DIGEST_ALGO.getEncoded()).digest(BYTES), equalTo(sha1Digest));
    assertThat(factory.getInstance(SHA224_DIGEST_ALGO.getEncoded()).digest(BYTES), equalTo(sha224Digest));
    assertThat(factory.getInstance(SHA256_DIGEST_ALGO.getEncoded()).digest(BYTES), equalTo(sha256Digest));
    assertThat(factory.getInstance(SHA384_DIGEST_ALGO.getEncoded()).digest(BYTES), equalTo(sha384Digest));
    assertThat(factory.getInstance(SHA512_DIGEST_ALGO.getEncoded()).digest(BYTES), equalTo(sha512Digest));
}