### Question:
AEAD { public byte[] open(final byte[] src, final long packetNumber, final byte[] aad) throws GeneralSecurityException { return process(src, packetNumber, aad, otherKey, otherIV, Cipher.DECRYPT_MODE); } AEAD(
      final byte[] myKey,
      final byte[] otherKey,
      final byte[] myIV,
      final byte[] otherIV,
      final byte[] myPnKey,
      final byte[] otherPnKey); byte[] open(final byte[] src, final long packetNumber, final byte[] aad); byte[] seal(final byte[] src, final long packetNumber, final byte[] aad); int getSampleLength(); byte[] decryptHeader(final byte[] sample, final byte[] bs, final boolean shortHeader); byte[] encryptHeader(final byte[] sample, final byte[] bs, final boolean shortHeader); byte[] getMyKey(); byte[] getOtherKey(); byte[] getMyIV(); byte[] getOtherIV(); byte[] getMyPnKey(); byte[] getOtherPnKey(); @Override String toString(); static final int OVERHEAD; }### Answer:
@Test public void open() throws GeneralSecurityException { final byte[] actual = aead.open(otherCipherText, packetNumber, aad); assertArrayEquals(plainText, actual); }
@Test(expected = AEADBadTagException.class) public void openBadAad() throws GeneralSecurityException { final byte[] actual = aead.open(otherCipherText, packetNumber, new byte[aad.length]); assertArrayEquals(plainText, actual); }