### Question:
RestfulEnclaveClient implements EnclaveClient { @Override public byte[] createNewRecipientBox(final EncodedPayload payload, final PublicKey recipientKey) { return ClientCallback.execute( () -> { final byte[] body = PayloadEncoder.create().encode(payload); final EnclaveUnencryptPayload dto = new EnclaveUnencryptPayload(); dto.setData(body); dto.setProvidedKey(recipientKey.getKeyBytes()); final Response response = client.target(uri).path("addRecipient").request().post(Entity.json(dto)); validateResponseIsOk(response); return response.readEntity(byte[].class); }); } RestfulEnclaveClient(Client client, URI uri);  RestfulEnclaveClient(Client client, URI uri, ExecutorService executorService); @Override PublicKey defaultPublicKey(); @Override Set<PublicKey> getForwardingKeys(); @Override Set<PublicKey> getPublicKeys(); @Override EncodedPayload encryptPayload(
            byte[] message, PublicKey senderPublicKey, List<PublicKey> recipientPublicKeys); @Override EncodedPayload encryptPayload(RawTransaction rawTransaction, List<PublicKey> recipientPublicKeys); @Override RawTransaction encryptRawPayload(byte[] message, PublicKey sender); @Override byte[] unencryptTransaction(EncodedPayload payload, PublicKey providedKey); @Override byte[] createNewRecipientBox(final EncodedPayload payload, final PublicKey recipientKey); @Override Service.Status status();  }### Answer:
@Test public void createNewRecipientBox() { EncodedPayload payload = Fixtures.createSample(); PublicKey providedKey = PublicKey.from("ProvidedKey".getBytes()); byte[] outcome = "SUCCESS".getBytes(); when(enclave.createNewRecipientBox(any(EncodedPayload.class), any(PublicKey.class))).thenReturn(outcome); byte[] result = enclaveClient.createNewRecipientBox(payload, providedKey); assertThat(result).isEqualTo(outcome); verify(enclave).createNewRecipientBox(any(EncodedPayload.class), any(PublicKey.class)); }