@Test
public void testPoly1305VerifyMacThrowsIllegalArgExpWhenKeyLenIsGreaterThan32()
    throws GeneralSecurityException {

  try {
    Poly1305.verifyMac(new byte[MAC_KEY_SIZE_IN_BYTES + 1], new byte[0], new byte[0]);
    fail("Expected IllegalArgumentException.");
  } catch (IllegalArgumentException e) {
    Truth.assertThat(e).hasMessageThat().containsMatch("The key length in bytes must be 32.");
  }
}