diff --git a/service/application/src/test/java/com/solace/maas/ep/event/management/agent/service/ScanServiceTests.java b/service/application/src/test/java/com/solace/maas/ep/event/management/agent/service/ScanServiceTests.java index 8820a09f..2cd71e3a 100644 --- a/service/application/src/test/java/com/solace/maas/ep/event/management/agent/service/ScanServiceTests.java +++ b/service/application/src/test/java/com/solace/maas/ep/event/management/agent/service/ScanServiceTests.java @@ -372,6 +372,19 @@ public void testIsScanCompleteIsNotComplete(String scanStatus) { Assertions.assertFalse(scanService.isScanComplete("scan1")); } + @Test + @SneakyThrows + public void testIsScanCompleteIsNotCompleteEmptyScanTypeList() { + ScanStatusEntity scanStatusA = scanServiceHelper.buildScanStatusEntity("status1", "COMPLETE"); + + when(scanTypeRepository.findAllByScanId(any(String.class))) + .thenReturn(List.of()); + when(scanStatusRepository.findByScanType(any(ScanTypeEntity.class))) + .thenReturn(scanStatusA); + + Assertions.assertFalse(scanService.isScanComplete("scan1")); + } + @Test @SneakyThrows public void testIsScanCompleteIsCompleteScans() {