### Question:
JnaclSecretBox implements SecretBox { @Override public int cryptoBoxAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey) { return curve25519xsalsa20poly1305.crypto_box_afternm(output, message, messageLength, nonce, sharedKey); }  @Override int cryptoBoxBeforenm(final byte[] output, final byte[] publicKey, final byte[] privateKey); @Override int cryptoBoxAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey); @Override int cryptoBoxOpenAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey); @Override int cryptoBoxKeypair(final byte[] publicKey, final byte[] privateKey);  }### Answer:
@Test public void sealingMessageUsingSymmetricKeyFailsIfMessageIsLessThanRequiredLength() { final int success = this.secretBox .cryptoBoxAfternm(new byte[0], new byte[0], 0, new byte[0], new byte[0]); assertThat(success).isEqualTo(-1); }
@Test public void sealingMessageUsingSymmetricKeySucceeds() { final int success = this.secretBox .cryptoBoxAfternm(new byte[32], new byte[32], 32, new byte[24], new byte[32]); assertThat(success).isEqualTo(0); }