### Question:
HmacUtils { public static byte[] hmacSha1(final byte[] key, final byte[] valueToDigest) { try { return getHmacSha1(key).doFinal(valueToDigest); } catch (final IllegalStateException e) { throw new IllegalArgumentException(e); } }  static Mac getHmacMd5(final byte[] key); static Mac getHmacSha1(final byte[] key); static Mac getHmacSha256(final byte[] key); static Mac getHmacSha384(final byte[] key); static Mac getHmacSha512(final byte[] key); static Mac getInitializedMac(final HmacAlgorithms algorithm, final byte[] key); static Mac getInitializedMac(final String algorithm, final byte[] key); static byte[] hmacMd5(final byte[] key, final byte[] valueToDigest); static byte[] hmacMd5(final byte[] key, final InputStream valueToDigest); static byte[] hmacMd5(final String key, final String valueToDigest); static String hmacMd5Hex(final byte[] key, final byte[] valueToDigest); static String hmacMd5Hex(final byte[] key, final InputStream valueToDigest); static String hmacMd5Hex(final String key, final String valueToDigest); static byte[] hmacSha1(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha1(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha1(final String key, final String valueToDigest); static String hmacSha1Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha1Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha1Hex(final String key, final String valueToDigest); static byte[] hmacSha256(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha256(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha256(final String key, final String valueToDigest); static String hmacSha256Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha256Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha256Hex(final String key, final String valueToDigest); static byte[] hmacSha384(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha384(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha384(final String key, final String valueToDigest); static String hmacSha384Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha384Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha384Hex(final String key, final String valueToDigest); static byte[] hmacSha512(final byte[] key, final byte[] valueToDigest); static byte[] hmacSha512(final byte[] key, final InputStream valueToDigest); static byte[] hmacSha512(final String key, final String valueToDigest); static String hmacSha512Hex(final byte[] key, final byte[] valueToDigest); static String hmacSha512Hex(final byte[] key, final InputStream valueToDigest); static String hmacSha512Hex(final String key, final String valueToDigest); static Mac updateHmac(final Mac mac, final byte[] valueToDigest); static Mac updateHmac(final Mac mac, final InputStream valueToDigest); static Mac updateHmac(final Mac mac, final String valueToDigest);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testSha1HMacFail() throws IOException { HmacUtils.hmacSha1((byte[]) null, STANDARD_PHRASE_BYTES); }