From aa43971e87895407457e30e66c30464c59c11ece Mon Sep 17 00:00:00 2001 From: Jorge Ortiz Date: Mon, 4 Nov 2024 20:27:21 +0100 Subject: [PATCH] MET-6199 update unit tests --- .../service/debias/DeBiasStateServiceImplTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/eu/europeana/metis/sandbox/service/debias/DeBiasStateServiceImplTest.java b/src/test/java/eu/europeana/metis/sandbox/service/debias/DeBiasStateServiceImplTest.java index d081907f..bcafea88 100644 --- a/src/test/java/eu/europeana/metis/sandbox/service/debias/DeBiasStateServiceImplTest.java +++ b/src/test/java/eu/europeana/metis/sandbox/service/debias/DeBiasStateServiceImplTest.java @@ -185,10 +185,10 @@ void testGetDetectionInfo_ObjectWhenExistsProcessing_expectSuccess() { when(recordDeBiasMainRepository.findByRecordIdDatasetId(anyString())).thenReturn(List.of(recordDeBiasMainEntity)); when(recordDeBiasDetailRepository.findByDebiasIdId(anyLong())).thenReturn(List.of(recordDeBiasDetailEntity)); - when(recordLogRepository.findRecordLogByDatasetIdAndStepAndStatus(datasetId.toString(), Step.DEBIAS, Status.SUCCESS)) - .thenReturn(Set.of(new RecordLogEntity())); - when(recordLogRepository.findRecordLogByDatasetIdAndStep(datasetId.toString(), Step.NORMALIZE)) - .thenReturn(Set.of(new RecordLogEntity(), new RecordLogEntity())); + when(recordLogRepository.getProgressDeBiasCounterByDatasetId(datasetId.toString())) + .thenReturn(1); + when(recordLogRepository.getTotalDeBiasCounterByDatasetId(datasetId.toString())) + .thenReturn(2); DeBiasReportDto deBiasReportDto = debiasStateServiceImpl.getDeBiasReport(datasetId);