@Test @RunWithCustomExecutor public void testgetLifecycleUnit() throws Exception { when(accessExternalClient.selectUnitLifeCycleById(any(), any(), any())).thenReturn(searchResult); final RequestResponseOK results = (RequestResponseOK) userInterfaceTransactionManager .selectUnitLifeCycleById("1", context); ArgumentCaptor<JsonNode> selectArgument = ArgumentCaptor.forClass(JsonNode.class); verify(accessExternalClient).selectUnitLifeCycleById(any(), any(), selectArgument.capture()); assertFalse(selectArgument.getValue().has("$filter")); assertFalse(selectArgument.getValue().has("$query")); }
public RequestResponse<LogbookLifecycle> selectUnitLifeCycleById(String unitLifeCycleId, VitamContext context) throws VitamClientException { try (AccessExternalClient client = accessExternalClientFactory.getClient()) { return client.selectUnitLifeCycleById( context, unitLifeCycleId, new Select().getFinalSelectById()); } }
UserInterfaceTransactionManager { public RequestResponse<LogbookLifecycle> selectUnitLifeCycleById(String unitLifeCycleId, VitamContext context) throws VitamClientException { try (AccessExternalClient client = accessExternalClientFactory.getClient()) { return client.selectUnitLifeCycleById( context, unitLifeCycleId, new Select().getFinalSelectById()); } } }
UserInterfaceTransactionManager { public RequestResponse<LogbookLifecycle> selectUnitLifeCycleById(String unitLifeCycleId, VitamContext context) throws VitamClientException { try (AccessExternalClient client = accessExternalClientFactory.getClient()) { return client.selectUnitLifeCycleById( context, unitLifeCycleId, new Select().getFinalSelectById()); } } UserInterfaceTransactionManager(); @VisibleForTesting  UserInterfaceTransactionManager(
        AccessExternalClientFactory accessExternalClientFactory,
        AdminExternalClientFactory adminExternalClientFactory,
        AccessExternalClientV2Factory accessExternalClientV2Factory,
        DslQueryHelper dslQueryHelper); }
UserInterfaceTransactionManager { public RequestResponse<LogbookLifecycle> selectUnitLifeCycleById(String unitLifeCycleId, VitamContext context) throws VitamClientException { try (AccessExternalClient client = accessExternalClientFactory.getClient()) { return client.selectUnitLifeCycleById( context, unitLifeCycleId, new Select().getFinalSelectById()); } } UserInterfaceTransactionManager(); @VisibleForTesting  UserInterfaceTransactionManager(
        AccessExternalClientFactory accessExternalClientFactory,
        AdminExternalClientFactory adminExternalClientFactory,
        AccessExternalClientV2Factory accessExternalClientV2Factory,
        DslQueryHelper dslQueryHelper); static UserInterfaceTransactionManager getInstance(); RequestResponse<JsonNode> searchUnits(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> searchObjects(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> getArchiveUnitDetails(JsonNode preparedDslQuery, String unitId,
        VitamContext context); RequestResponse<JsonNode> selectUnitsWithInheritedRules(JsonNode preparedDslQuery,
        VitamContext context); RequestResponse<JsonNode> startEliminationAnalysis(EliminationRequestBody parameters,
        VitamContext context); RequestResponse<JsonNode> startEliminationAction(EliminationRequestBody parameters,
        VitamContext context); RequestResponse<JsonNode> massiveUnitsUpdate(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> computinheritedrules(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> deleteComputedInheritedRules(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> massiveRulesUpdate(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> updateUnits(JsonNode parameters, String unitId, VitamContext context); RequestResponse<JsonNode> selectObjectbyId(JsonNode preparedDslQuery, String objectId,
        VitamContext context); boolean getObjectAsInputStream(AsyncResponse asyncResponse,
        String unitId, String usage, int version, String filename, VitamContext context,
        List<MediaType> allowedMediaTypes); RequestResponse<LogbookLifecycle> selectUnitLifeCycleById(String unitLifeCycleId,
        VitamContext context); RequestResponse<LogbookOperation> selectOperation(JsonNode query, VitamContext context); RequestResponse<LogbookOperation> selectOperationbyId(String operationId, VitamContext context); RequestResponse<LogbookLifecycle> selectObjectGroupLifeCycleById(String objectGroupLifeCycleId,
        VitamContext context); RequestResponse<AccessionRegisterSummaryModel> findAccessionRegisterSummary(String options,
        VitamContext context); RequestResponse<AccessionRegisterSymbolicModel> findAccessionRegisterSymbolic(String options,
        VitamContext context); RequestResponse<JsonNode> findAccessionRegisterDetail(String originatingAgency, String options, VitamContext context); RequestResponse<JsonNode> checkTraceabilityOperation(JsonNode query, VitamContext context); JsonNode extractInformationFromTimestamp(String timestamp); RequestResponse evidenceAudit(JsonNode query, VitamContext context); RequestResponse exportProbativeValue(ProbativeValueRequest request, VitamContext context); RequestResponse<JsonNode> exportDIP(DipRequest dipRequest, VitamContext context); RequestResponse<JsonNode> transferSIP(TransferRequest transferRequest, VitamContext context); boolean downloadExports(AsyncResponse asyncResponse, String exportId, VitamContext context, boolean isTransfer); VitamContext getVitamContext(HttpServletRequest request); VitamContext getVitamContext(Integer tenantId, String contractId, String personalCert); VitamContext getVitamContext(Integer tenantId, String contractId, HttpServletRequest request); String getPersonalCertificate(HttpServletRequest request); String getContractId(HttpServletRequest request); Integer getTenantId(HttpServletRequest request); String getAppSessionId(); }
UserInterfaceTransactionManager { public RequestResponse<LogbookLifecycle> selectUnitLifeCycleById(String unitLifeCycleId, VitamContext context) throws VitamClientException { try (AccessExternalClient client = accessExternalClientFactory.getClient()) { return client.selectUnitLifeCycleById( context, unitLifeCycleId, new Select().getFinalSelectById()); } } UserInterfaceTransactionManager(); @VisibleForTesting  UserInterfaceTransactionManager(
        AccessExternalClientFactory accessExternalClientFactory,
        AdminExternalClientFactory adminExternalClientFactory,
        AccessExternalClientV2Factory accessExternalClientV2Factory,
        DslQueryHelper dslQueryHelper); static UserInterfaceTransactionManager getInstance(); RequestResponse<JsonNode> searchUnits(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> searchObjects(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> getArchiveUnitDetails(JsonNode preparedDslQuery, String unitId,
        VitamContext context); RequestResponse<JsonNode> selectUnitsWithInheritedRules(JsonNode preparedDslQuery,
        VitamContext context); RequestResponse<JsonNode> startEliminationAnalysis(EliminationRequestBody parameters,
        VitamContext context); RequestResponse<JsonNode> startEliminationAction(EliminationRequestBody parameters,
        VitamContext context); RequestResponse<JsonNode> massiveUnitsUpdate(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> computinheritedrules(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> deleteComputedInheritedRules(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> massiveRulesUpdate(JsonNode parameters, VitamContext context); RequestResponse<JsonNode> updateUnits(JsonNode parameters, String unitId, VitamContext context); RequestResponse<JsonNode> selectObjectbyId(JsonNode preparedDslQuery, String objectId,
        VitamContext context); boolean getObjectAsInputStream(AsyncResponse asyncResponse,
        String unitId, String usage, int version, String filename, VitamContext context,
        List<MediaType> allowedMediaTypes); RequestResponse<LogbookLifecycle> selectUnitLifeCycleById(String unitLifeCycleId,
        VitamContext context); RequestResponse<LogbookOperation> selectOperation(JsonNode query, VitamContext context); RequestResponse<LogbookOperation> selectOperationbyId(String operationId, VitamContext context); RequestResponse<LogbookLifecycle> selectObjectGroupLifeCycleById(String objectGroupLifeCycleId,
        VitamContext context); RequestResponse<AccessionRegisterSummaryModel> findAccessionRegisterSummary(String options,
        VitamContext context); RequestResponse<AccessionRegisterSymbolicModel> findAccessionRegisterSymbolic(String options,
        VitamContext context); RequestResponse<JsonNode> findAccessionRegisterDetail(String originatingAgency, String options, VitamContext context); RequestResponse<JsonNode> checkTraceabilityOperation(JsonNode query, VitamContext context); JsonNode extractInformationFromTimestamp(String timestamp); RequestResponse evidenceAudit(JsonNode query, VitamContext context); RequestResponse exportProbativeValue(ProbativeValueRequest request, VitamContext context); RequestResponse<JsonNode> exportDIP(DipRequest dipRequest, VitamContext context); RequestResponse<JsonNode> transferSIP(TransferRequest transferRequest, VitamContext context); boolean downloadExports(AsyncResponse asyncResponse, String exportId, VitamContext context, boolean isTransfer); VitamContext getVitamContext(HttpServletRequest request); VitamContext getVitamContext(Integer tenantId, String contractId, String personalCert); VitamContext getVitamContext(Integer tenantId, String contractId, HttpServletRequest request); String getPersonalCertificate(HttpServletRequest request); String getContractId(HttpServletRequest request); Integer getTenantId(HttpServletRequest request); String getAppSessionId();  }