@Test @RunWithCustomExecutor public void shouldGetGriffinById() throws Exception { DbRequestResult dbRequestResult = new DbRequestResult(); when(mongoDbAccess.findDocuments(any(), eq(GRIFFIN))).thenReturn(dbRequestResult); RequestResponse<GriffinModel> griffin = griffinService.findGriffin(getFromString("{}")); assertThat(griffin).isNotNull(); }
public RequestResponse<GriffinModel> findGriffin(JsonNode queryDsl) throws ReferentialException, BadRequestException, InvalidParseOperationException { DbRequestResult documents = mongoDbAccess.findDocuments(queryDsl, GRIFFIN); return documents.getRequestResponseOK(queryDsl, Griffin.class, GriffinModel.class); }
GriffinService { public RequestResponse<GriffinModel> findGriffin(JsonNode queryDsl) throws ReferentialException, BadRequestException, InvalidParseOperationException { DbRequestResult documents = mongoDbAccess.findDocuments(queryDsl, GRIFFIN); return documents.getRequestResponseOK(queryDsl, Griffin.class, GriffinModel.class); } }
GriffinService { public RequestResponse<GriffinModel> findGriffin(JsonNode queryDsl) throws ReferentialException, BadRequestException, InvalidParseOperationException { DbRequestResult documents = mongoDbAccess.findDocuments(queryDsl, GRIFFIN); return documents.getRequestResponseOK(queryDsl, Griffin.class, GriffinModel.class); } @VisibleForTesting  GriffinService(MongoDbAccessReferential mongoDbAccess, FunctionalBackupService functionalBackupService, LogbookOperationsClientFactory logbookOperationsClientFactory, VitamCollection preservationScenarioCollection);  GriffinService(MongoDbAccessAdminImpl mongoAccess, FunctionalBackupService functionalBackupService); }
GriffinService { public RequestResponse<GriffinModel> findGriffin(JsonNode queryDsl) throws ReferentialException, BadRequestException, InvalidParseOperationException { DbRequestResult documents = mongoDbAccess.findDocuments(queryDsl, GRIFFIN); return documents.getRequestResponseOK(queryDsl, Griffin.class, GriffinModel.class); } @VisibleForTesting  GriffinService(MongoDbAccessReferential mongoDbAccess, FunctionalBackupService functionalBackupService, LogbookOperationsClientFactory logbookOperationsClientFactory, VitamCollection preservationScenarioCollection);  GriffinService(MongoDbAccessAdminImpl mongoAccess, FunctionalBackupService functionalBackupService); RequestResponse<GriffinModel> importGriffin(@NotNull List<GriffinModel> griffinsFromRequest); RequestResponse<GriffinModel> findGriffin(JsonNode queryDsl); }
GriffinService { public RequestResponse<GriffinModel> findGriffin(JsonNode queryDsl) throws ReferentialException, BadRequestException, InvalidParseOperationException { DbRequestResult documents = mongoDbAccess.findDocuments(queryDsl, GRIFFIN); return documents.getRequestResponseOK(queryDsl, Griffin.class, GriffinModel.class); } @VisibleForTesting  GriffinService(MongoDbAccessReferential mongoDbAccess, FunctionalBackupService functionalBackupService, LogbookOperationsClientFactory logbookOperationsClientFactory, VitamCollection preservationScenarioCollection);  GriffinService(MongoDbAccessAdminImpl mongoAccess, FunctionalBackupService functionalBackupService); RequestResponse<GriffinModel> importGriffin(@NotNull List<GriffinModel> griffinsFromRequest); RequestResponse<GriffinModel> findGriffin(JsonNode queryDsl);  }