Test getProvider() is Apache Commons Collections.
This commit is contained in:
parent
6215948227
commit
4ecffb5fee
|
@ -59,7 +59,8 @@ public final class MD5Cyclic implements HashFunction {
|
||||||
try {
|
try {
|
||||||
messageDigest = MessageDigest.getInstance(NAME);
|
messageDigest = MessageDigest.getInstance(NAME);
|
||||||
} catch (final NoSuchAlgorithmException e) {
|
} 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);
|
signature = apply(HashFunctionIdentity.prepareSignatureBuffer(this), 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,5 +58,6 @@ public class MD5CyclicTest {
|
||||||
md5.getProcessType());
|
md5.getProcessType());
|
||||||
final long expected = md5.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
|
final long expected = md5.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
|
||||||
assertEquals(expected, md5.getSignature());
|
assertEquals(expected, md5.getSignature());
|
||||||
|
assertEquals("Apache Commons Collections", md5.getProvider());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,5 +60,6 @@ public class Murmur128x86CyclicTest {
|
||||||
murmur.getProcessType());
|
murmur.getProcessType());
|
||||||
final long expected = murmur.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
|
final long expected = murmur.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
|
||||||
assertEquals(expected, murmur.getSignature());
|
assertEquals(expected, murmur.getSignature());
|
||||||
|
assertEquals("Apache Commons Collections", murmur.getProvider());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,5 +58,6 @@ public class Murmur32x86IterativeTest {
|
||||||
murmur.getProcessType());
|
murmur.getProcessType());
|
||||||
final long expected = murmur.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
|
final long expected = murmur.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
|
||||||
assertEquals(expected, murmur.getSignature());
|
assertEquals(expected, murmur.getSignature());
|
||||||
|
assertEquals("Apache Commons Collections", murmur.getProvider());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,5 +63,6 @@ public class ObjectsHashIterativeTest {
|
||||||
final long expected2 = obj.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
|
final long expected2 = obj.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
|
||||||
assertEquals(expected, expected2);
|
assertEquals(expected, expected2);
|
||||||
assertEquals(expected, obj.getSignature());
|
assertEquals(expected, obj.getSignature());
|
||||||
|
assertEquals("Apache Commons Collections", obj.getProvider());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue