@Test
    void should_notify_subscribed_events() {
        String eventLabel = "test::event::simpleNotify";
        List<Pair<String, Object>> callstack1 = new LinkedList<Pair<String, Object>>();
        List<Pair<String, Object>> callstack2 = new LinkedList<Pair<String, Object>>();

        // Add two event subscribers and ensure they are not called early
        eventService.subscribe(eventLabel, e -> callstack1.add(new Pair<String, Object>(e.getLabel(), e.getData())));
        eventService.subscribe(eventLabel, e -> callstack2.add(new Pair<String, Object>(e.getLabel(), e.getData())));
        Assertions.assertEquals(0, callstack1.size());
        Assertions.assertEquals(0, callstack2.size());

        // Send an event and ensure both subscribers receive them
        eventService.sendEvent(eventLabel, "payload");
        Assertions.assertDoesNotThrow(() -> Thread.sleep(10));
        Assertions.assertEquals(1, callstack1.size());
        Assertions.assertEquals(1, callstack2.size());
    }
Test that event subscriptions are honored
src/test/java/com/kodedu/service/impl/EventServiceTest.java