### Question:
HashUtil { public static String checksum(byte[] data) { byte[] hashBytes = getMessageDigest().digest(Preconditions.checkNotNull(data)); return bytesToHex(hashBytes); } private  HashUtil(); static String checksum(byte[] data); static String bytesToHex(byte[] hashBytes); static String rawChecksum(byte[] data); static MessageDigest getMessageDigest();  }### Answer:
@Test public void testChecksum() throws Exception { byte[] data = new byte[] {Byte.MAX_VALUE, Byte.MIN_VALUE}; assertEquals("d41d8cd98f00b204e9800998ecf8427e", HashUtil.checksum(new byte[]{})); assertEquals("a494a8690b72391b13d3cbe27edb5c58", HashUtil.checksum(new byte[]{Byte.MAX_VALUE, Byte.MIN_VALUE})); }
@Test(expected = NullPointerException.class) public void testChecksumNPE() { HashUtil.checksum(null); }