### Question:
Hash { public byte[] blake2(byte[] message) throws UnsupportedOperationException { if (!blakeSupportedVersion()) throw new UnsupportedOperationException(); buffer = new byte[SodiumConstants.BLAKE2B_OUTBYTES]; sodium().crypto_generichash_blake2b(buffer, SodiumConstants.BLAKE2B_OUTBYTES, message, message.length, new byte[0], 0); return buffer; }  byte[] sha256(byte[] message); byte[] sha512(byte[] message); String sha256(String message, Encoder encoder); String sha512(String message, Encoder encoder); String pwhash_scryptsalsa208sha256(String passwd, Encoder encoder, byte[] salt, int opslimit, int memlimit); byte[] blake2(byte[] message); String blake2(String message, Encoder encoder);  }### Answer:
@Test public void testBlake2() throws Exception { final byte[] rawMessage = Blake2_Message.getBytes(); String result = HEX.encode(hash.blake2(rawMessage)); assertEquals(HASH_ERR,Blake2_HEXDIGEST,result); }
@Test public void testBlake2EmptyString() throws Exception { byte[] result = hash.blake2("".getBytes()); assertEquals(HASH_ERR, Blake2_DIGEST_EMPTY_STRING, HEX.encode(result)); }
@Test public void testBlake2HexString() throws Exception { String result = hash.blake2(Blake2_Message, HEX); assertEquals(HASH_ERR,Blake2_HEXDIGEST,result); }
@Test public void testBlake2EmptyHexString() throws Exception { String result = hash.blake2("", HEX); assertEquals(HASH_ERR, Blake2_DIGEST_EMPTY_STRING, result); }
@Test public void testBlake2NullByte() { byte[] result=hash.blake2("\0".getBytes()); assertEquals(HASH_ERR, Blake2_DIGEST_NULL, HEX.encode(result)); }