class 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);
                });
    }

    public  RestfulEnclaveClient(Client client, URI uri);
    public  RestfulEnclaveClient(Client client, URI uri, ExecutorService executorService);

}