byte[] bobPrivateKey = HEX.decode(BOB_PRIVATE_KEY);
byte[] bobPublicKey = HEX.decode(BOB_PUBLIC_KEY);
byte[] alicePrivateKey = HEX.decode(ALICE_PRIVATE_KEY);
byte[] alicePublicKey = HEX.decode(ALICE_PUBLIC_KEY);
KeyPair cryptoBoxKeyPair = new KeyPair(bobPrivateKey, alicePublicKey);
CryptoBox cryptoBox = new CryptoBox(cryptoBoxKeyPair.getPrivateKey(), cryptoBoxKeyPair.getPublicKey());
byte[] IV = HEX.decode(BOX_NONCE);
byte[] expectedMessage = HEX.decode(BOX_MESSAGE);
byte[] ciphertext = cryptoBox.encrypt(IV, expectedMessage);
KeyPair pandoraBoxKeyPair = new KeyPair(alicePrivateKey, bobPublicKey);
CryptoBox pandora = new CryptoBox(pandoraBoxKeyPair.getPrivateKey(), pandoraBoxKeyPair.getPublicKey());
byte[] message = pandora.decrypt(IV, ciphertext);
assertTrue("failed to decrypt ciphertext", Arrays.equals(message, expectedMessage));
}