@Override
    public void invoke(NamingEvent event) {
        logInvoke(event);
        if (listener instanceof AbstractEventListener && ((AbstractEventListener) listener).getExecutor() != null) {
            ((AbstractEventListener) listener).getExecutor().execute(() -> listener.onEvent(event));
        } else {
            listener.onEvent(event);
        }
    }
@Test
    public void testEventListener() {
        EventListener listener = mock(EventListener.class);
        NamingListenerInvoker listenerInvoker = new NamingListenerInvoker(listener);
        NamingEvent event = new NamingEvent("serviceName", Collections.emptyList());
        listenerInvoker.invoke(event);
        verify(listener).onEvent(event);
    }