### Question:
SecretBox { public byte[] decrypt(byte[] nonce, byte[] ciphertext) { checkLength(nonce, XSALSA20_POLY1305_SECRETBOX_NONCEBYTES); byte[] ct = Util.prependZeros(BOXZERO_BYTES, ciphertext); byte[] message = Util.zeros(ct.length); isValid(sodium().crypto_secretbox_xsalsa20poly1305_open(message, ct, ct.length, nonce, key), "Decryption failed. Ciphertext failed verification"); return removeZeros(ZERO_BYTES, message); } SecretBox(byte[] key);  SecretBox(String key, Encoder encoder); byte[] encrypt(byte[] nonce, byte[] message); byte[] decrypt(byte[] nonce, byte[] ciphertext);  }### Answer:
@Test public void testDecrypt() throws Exception { SecretBox box = new SecretBox(SECRET_KEY, HEX); byte[] nonce = HEX.decode(BOX_NONCE); byte[] expectedMessage = HEX.decode(BOX_MESSAGE); byte[] ciphertext = box.encrypt(nonce, expectedMessage); byte[] message = box.decrypt(nonce, ciphertext); assertTrue("failed to decrypt ciphertext", Arrays.equals(message, expectedMessage)); }