Test getProvider() is Apache Commons Collections.

This commit is contained in:
aherbert 2020-02-18 13:47:24 +00:00
parent 6215948227
commit 4ecffb5fee
5 changed files with 6 additions and 1 deletions

View File

@ -59,7 +59,8 @@ public final class MD5Cyclic implements HashFunction {
try {
messageDigest = MessageDigest.getInstance(NAME);
} catch (final NoSuchAlgorithmException e) {
throw new IllegalStateException(e.getMessage());
// This should not happen
throw new IllegalStateException("Missing the standard MD5 message digest algorithm", e);
}
signature = apply(HashFunctionIdentity.prepareSignatureBuffer(this), 0);
}

View File

@ -58,5 +58,6 @@ public class MD5CyclicTest {
md5.getProcessType());
final long expected = md5.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
assertEquals(expected, md5.getSignature());
assertEquals("Apache Commons Collections", md5.getProvider());
}
}

View File

@ -60,5 +60,6 @@ public class Murmur128x86CyclicTest {
murmur.getProcessType());
final long expected = murmur.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
assertEquals(expected, murmur.getSignature());
assertEquals("Apache Commons Collections", murmur.getProvider());
}
}

View File

@ -58,5 +58,6 @@ public class Murmur32x86IterativeTest {
murmur.getProcessType());
final long expected = murmur.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
assertEquals(expected, murmur.getSignature());
assertEquals("Apache Commons Collections", murmur.getProvider());
}
}

View File

@ -63,5 +63,6 @@ public class ObjectsHashIterativeTest {
final long expected2 = obj.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
assertEquals(expected, expected2);
assertEquals(expected, obj.getSignature());
assertEquals("Apache Commons Collections", obj.getProvider());
}
}