class PartyInfoResource {

    @POST
    @Path("validate")
    @Consumes(MediaType.APPLICATION_OCTET_STREAM)
    @Produces(MediaType.TEXT_PLAIN)
    @ApiOperation(value = "Processes the validation request data and returns the result.")
    @ApiResponses({
        @ApiResponse(
            code = 200,
            message = "Validation request data successfully processed and returned",
            response = String.class),
        @ApiResponse(code = 400, message = "Validation request data is not a valid UUID")
    })
    public Response validate(byte[] payloadData) {
        final EncodedPayload payload = payloadEncoder.decode(payloadData);

        final PublicKey mykey = payload.getRecipientKeys().iterator().next();

        final byte[] result = enclave.unencryptTransaction(payload, mykey);
        final String resultStr = new String(result);

        if (!isUUID(resultStr)) {
            return Response.status(Response.Status.BAD_REQUEST).build();
        }
        return Response.ok(new String(result)).build();
    }

    public  PartyInfoResource(
        final Discovery discovery,
        final PartyInfoParser partyInfoParser,
        final Client restClient,
        final Enclave enclave,
        final PayloadEncoder payloadEncoder,
        final boolean enableKeyValidation,
        final PartyStore partyStore);
    public  PartyInfoResource(
        final Discovery discovery,
        final PartyInfoParser partyInfoParser,
        final Client restClient,
        final Enclave enclave,
        final boolean enableKeyValidation);

}