DataTransferAuditDaoTest.ktremoveFromQueueTest() — creates audit entries with different timestamps, verifies internalGetEntriesByAreaId() returns all 3, then tests queue retrieval logic: entries older than a threshold should be eligible for notification, recent entries should remain queuedPFDateTime.now().minus(D, ChronoUnit.DAYS/MINUTES) to simulate time-shifted audit entriesinternalGetQueuedEntriesByAreaId() — filtered query returning only entries pending notificationnotified flag transition: queued → notified → removed from queue@Autowired DataTransferAuditDao — the DAO under test (manages t_plugin_datatransfer_audit table)@Autowired DataTransferAreaDao — injected only to satisfy DataTransferAuditDao.dataTransferAreaDao dependencyoverride fun beforeAll() — calls recreateDataBase() to wipe any test data from other test classesinit { DataTransferTestService.addPluginEntitiesForTestMode() } — registers plugin entities with the persistence layerThe audit queue is the mechanism for observer notifications (see mail template #112):
dataTransferAuditDao.insert() with notified=falseinternalGetQueuedEntriesByAreaId() to find un-notified entriesnotified=true (via removeFromQueue())
Integration test for
DataTransferAuditDao— verifies the audit log DAO's queue management, notification tracking, and entry retrieval. ExtendsAbstractTestBasewith Spring autowired DAOs andrecreateDataBase()for test isolation.