class RestfulClientProvisioner implements ClientProvisioner {

    IdentityResponseEnvelope attestIdentityRequest(final IdentityRequestEnvelope identityRequest) {
        // create HTTP entity wrapper for the identity request
        HttpEntity<byte[]> message = new HttpEntity<>(structConverter.convert(identityRequest));

        // send the identity request to the ACA and receive the identity response.
        ResponseEntity<byte[]> response =
                restTemplate.exchange(acaIdentityURL, HttpMethod.POST, message, byte[].class);

        byte[] responseBody = response.getBody();
        if (ArrayUtils.isEmpty(responseBody)) {
            return null;
        }

        // grab the response from the HTTP response
        return structConverter.convert(responseBody, IdentityResponseEnvelope.class);
    }

}