### Question:
Hash { public static String sha256(String hexInput) { byte[] bytes = NumericUtil.hexToBytes(hexInput); byte[] result = sha256(bytes); return NumericUtil.bytesToHex(result); }  static String keccak256(String hex); static byte[] keccak256(byte[] input); static byte[] generateMac(byte[] derivedKey, byte[] cipherText); static String sha256(String hexInput); static byte[] sha256(byte[] input); static byte[] hmacSHA256(byte[] key, byte[] data); static byte[] merkleHash(byte[] oriData);  }### Answer:
@Test public void testSha256() { String msg = "0x3c9229289a6125f7fdf1885a77bb12c37a8d3b4962d936f7e3084dece32a3ca1"; String expected = "58bbda5e10bc11a32d808e40f9da2161a64f00b5557762a161626afe19137445"; assertEquals(expected, Hash.sha256(msg)); byte[] bytes = NumericUtil.hexToBytes(msg); assertEquals(expected, NumericUtil.bytesToHex(Hash.sha256(bytes))); }