UUIDType5 { public static MessageDigest getDigest(final String algorithm) { try { return MessageDigest.getInstance(algorithm); } catch (NoSuchAlgorithmException nsae) { throw new InternalError(algorithm + " not supported"); } } private  UUIDType5(); static UUID nameUUIDFromNamespaceAndString(final UUID namespace, final String name); static MessageDigest getDigest(final String algorithm); static UUID nameUUIDFromNamespaceAndBytes(final UUID namespace, final byte[] name); static final UUID NAMESPACE_URL; }
@Test void testNoSuchAlgorithmException() { assertThrows(InternalError.class, () -> { UUIDType5.getDigest("SHA-1024"); }); }