@Subscribe
    @SuppressWarnings("unused")
    public void handleDataNodeLifeCycleEvent(DataNodeLifecycleEvent event) {
        switch (event.trigger()) {
            case REMOVED -> handleNextNode(DataNodeLifecycleTrigger.REMOVE);
            case STOPPED -> handleNextNode(DataNodeLifecycleTrigger.STOP);
        }
    }
@Test
    public void removedLifecycleEventRemovesNextNode() {
        DataNodeDto node1 = buildTestNode("node1", DataNodeStatus.REMOVING);
        nodeService.registerServer(node1);
        DataNodeDto node2 = buildTestNode("node2", DataNodeStatus.AVAILABLE);
        nodeService.registerServer(node2);
        DataNodeDto node3 = buildTestNode("node3", DataNodeStatus.AVAILABLE);
        nodeService.registerServer(node3);

        nodeService.update(node2.toBuilder().setActionQueue(DataNodeLifecycleTrigger.REMOVE).build());
        nodeService.update(node3.toBuilder().setActionQueue(DataNodeLifecycleTrigger.REMOVE).build());

        classUnderTest.handleDataNodeLifeCycleEvent(DataNodeLifecycleEvent.create("node1", DataNodeLifecycleTrigger.REMOVED));

        verify(clusterEventBus, times(1)).post(any());

    }