From 3b20ea7bd26e394bc0cc7bffe4d1706903252e9f Mon Sep 17 00:00:00 2001 From: Sowmya Ujjappa Banakar Date: Thu, 1 Feb 2024 17:26:02 +0530 Subject: [PATCH] MOSIP-29868 Test case added Signed-off-by: Sowmya Ujjappa Banakar --- .../stages/demodedupe/DemoDedupeTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/registration-processor/core-processor/registration-processor-demo-dedupe-stage/src/test/java/io/mosip/registrationprocessor/stages/demodedupe/DemoDedupeTest.java b/registration-processor/core-processor/registration-processor-demo-dedupe-stage/src/test/java/io/mosip/registrationprocessor/stages/demodedupe/DemoDedupeTest.java index cc08bd29819..f790ec9cf35 100644 --- a/registration-processor/core-processor/registration-processor-demo-dedupe-stage/src/test/java/io/mosip/registrationprocessor/stages/demodedupe/DemoDedupeTest.java +++ b/registration-processor/core-processor/registration-processor-demo-dedupe-stage/src/test/java/io/mosip/registrationprocessor/stages/demodedupe/DemoDedupeTest.java @@ -213,9 +213,13 @@ public void testWithoutFilterByRefIds() { Mockito.when(packetInfoDao.getAllDemographicInfoDtos(any(), any(), any(), any())).thenReturn(Dtos); Mockito.when(packetInfoManager.getBioRefIdsByRegIds(anyList())).thenReturn(regBioRefDtos); - List duplicates = demoDedupe.performDedupe(regId, true); + List duplicatesInfant = demoDedupe.performDedupe(regId, true); + // expected to return only two id + assertEquals("Test for Dedupe Duplicate found", 2, duplicatesInfant.size()); + + List duplicatesAdult = demoDedupe.performDedupe(regId, false); // expected to return only one id - assertEquals("Test for Dedupe Duplicate found", 2, duplicates.size()); + assertEquals("Test for Dedupe Duplicate found", 1, duplicatesAdult.size()); } }