### Question:
Hashing { public String computeHashPrefix(String expression, int significantBytes) { checkSignificantBytes(significantBytes); int hexDigitsLength = significantBytes * 2; return DigestUtils.sha256Hex(expression).substring(0, hexDigitsLength); }  String computeHashPrefix(String expression, int significantBytes); String computeFullHash(String expression); static final int MIN_SIGNIFICANT_BYTES; static final int MAX_SIGNIFICANT_BYTES; }### Answer:
@Test(expected = IllegalArgumentException.class) public void testComputeHashPrefixWithInvalidParam5() { hashing.computeHashPrefix("abc", 33); }
@Test public void testComputeHashPrefix1() { String expression = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; String prefix = hashing.computeHashPrefix(expression, 6); Assert.assertEquals("248d6a61d206", prefix); }
@Test public void testComputeHashPrefix2() { String prefix = hashing.computeHashPrefix("abc", 4); Assert.assertEquals("ba7816bf", prefix); }
@Test(expected = IllegalArgumentException.class) public void testComputeHashPrefixWithInvalidParam1() { hashing.computeHashPrefix("abc", 0); }
@Test(expected = IllegalArgumentException.class) public void testComputeHashPrefixWithInvalidParam2() { hashing.computeHashPrefix("abc", 1); }
@Test(expected = IllegalArgumentException.class) public void testComputeHashPrefixWithInvalidParam3() { hashing.computeHashPrefix("abc", 2); }
@Test(expected = IllegalArgumentException.class) public void testComputeHashPrefixWithInvalidParam4() { hashing.computeHashPrefix("abc", 3); }