class MetaDataClientRest extends DefaultClient implements MetaDataClient {

    @Override
    public List<ObjectGroupPerOriginatingAgency> selectAccessionRegisterOnObjectByOperationId(String operationId)
        throws MetaDataClientServerException {
        try (Response response = make(get().withJson().withPath("/accession-registers/objects/" + operationId))) {
            check(response);
            RequestResponse<ObjectGroupPerOriginatingAgency> requestResponse =
                RequestResponse.parseFromResponse(response, ObjectGroupPerOriginatingAgency.class);
            if (requestResponse.isOk()) {
                RequestResponseOK<ObjectGroupPerOriginatingAgency> requestResponseOK =
                    (RequestResponseOK<ObjectGroupPerOriginatingAgency>) requestResponse;
                return requestResponseOK.getResults();
            }
            VitamError vitamError = (VitamError) requestResponse;
            LOGGER
                .error("find accession register for object group failed, http code is {}, error is {}",
                    vitamError.getCode(),
                    vitamError.getErrors());
            throw new MetaDataClientServerException(vitamError.getDescription());
        } catch (InvalidParseOperationException | VitamClientInternalException | MetaDataExecutionException | MetaDataDocumentSizeException | MetaDataNotFoundException e) {
            throw new MetaDataClientServerException(e);
        }
    }

    public  MetaDataClientRest(VitamClientFactoryInterface factory);

}