@Test @RunWithCustomExecutor public void shouldGetScenarioById() throws Exception { when(mongoDbAccess.findDocuments(any(), eq(PRESERVATION_SCENARIO))).thenReturn(dbRequestResult); when(dbRequestResult.getRequestResponseOK(any(), any(), any())) .thenReturn(new RequestResponseOK<>()); RequestResponse<PreservationScenarioModel> preservationScenario = preservationScenarioService.findPreservationScenario(getFromString("{}")); assertThat(preservationScenario).isNotNull(); }
public RequestResponse<PreservationScenarioModel> findPreservationScenario(JsonNode queryDsl) throws ReferentialException, BadRequestException, InvalidParseOperationException { DbRequestResult documents = mongoDbAccess.findDocuments(queryDsl, PRESERVATION_SCENARIO); return documents.getRequestResponseOK(queryDsl, PreservationScenario.class, PreservationScenarioModel.class); }
PreservationScenarioService { public RequestResponse<PreservationScenarioModel> findPreservationScenario(JsonNode queryDsl) throws ReferentialException, BadRequestException, InvalidParseOperationException { DbRequestResult documents = mongoDbAccess.findDocuments(queryDsl, PRESERVATION_SCENARIO); return documents.getRequestResponseOK(queryDsl, PreservationScenario.class, PreservationScenarioModel.class); } }
PreservationScenarioService { public RequestResponse<PreservationScenarioModel> findPreservationScenario(JsonNode queryDsl) throws ReferentialException, BadRequestException, InvalidParseOperationException { DbRequestResult documents = mongoDbAccess.findDocuments(queryDsl, PRESERVATION_SCENARIO); return documents.getRequestResponseOK(queryDsl, PreservationScenario.class, PreservationScenarioModel.class); } PreservationScenarioService(MongoDbAccessReferential mongoDbAccess,
        FunctionalBackupService functionalBackupService,
        LogbookOperationsClientFactory logbookOperationsClientFactory);  PreservationScenarioService(MongoDbAccessAdminImpl mongoAccess,
        FunctionalBackupService functionalBackupService); }
PreservationScenarioService { public RequestResponse<PreservationScenarioModel> findPreservationScenario(JsonNode queryDsl) throws ReferentialException, BadRequestException, InvalidParseOperationException { DbRequestResult documents = mongoDbAccess.findDocuments(queryDsl, PRESERVATION_SCENARIO); return documents.getRequestResponseOK(queryDsl, PreservationScenario.class, PreservationScenarioModel.class); } PreservationScenarioService(MongoDbAccessReferential mongoDbAccess,
        FunctionalBackupService functionalBackupService,
        LogbookOperationsClientFactory logbookOperationsClientFactory);  PreservationScenarioService(MongoDbAccessAdminImpl mongoAccess,
        FunctionalBackupService functionalBackupService); RequestResponse<PreservationScenarioModel> importScenarios(
        @NotNull List<PreservationScenarioModel> listToImport); RequestResponse<PreservationScenarioModel> findPreservationScenario(JsonNode queryDsl); }
PreservationScenarioService { public RequestResponse<PreservationScenarioModel> findPreservationScenario(JsonNode queryDsl) throws ReferentialException, BadRequestException, InvalidParseOperationException { DbRequestResult documents = mongoDbAccess.findDocuments(queryDsl, PRESERVATION_SCENARIO); return documents.getRequestResponseOK(queryDsl, PreservationScenario.class, PreservationScenarioModel.class); } PreservationScenarioService(MongoDbAccessReferential mongoDbAccess,
        FunctionalBackupService functionalBackupService,
        LogbookOperationsClientFactory logbookOperationsClientFactory);  PreservationScenarioService(MongoDbAccessAdminImpl mongoAccess,
        FunctionalBackupService functionalBackupService); RequestResponse<PreservationScenarioModel> importScenarios(
        @NotNull List<PreservationScenarioModel> listToImport); RequestResponse<PreservationScenarioModel> findPreservationScenario(JsonNode queryDsl);  }