@Test
public void testFailedVerification() throws GeneralSecurityException {

  try {
    byte[] key = new byte[MAC_KEY_SIZE_IN_BYTES];
    key[0] = 1;
    Poly1305.verifyMac(key, new byte[]{1}, new byte[MAC_TAG_SIZE_IN_BYTES]);
    fail("Expected GeneralSecurityException.");
  } catch (GeneralSecurityException e) {
    Truth.assertThat(e).hasMessageThat().containsMatch("invalid MAC");
  }
}