@Override
    public void onEvent(Event event) {
        Set<NacosTraceSubscriber> subscribers = interestedEvents.get(event.getClass());
        if (null == subscribers) {
            return;
        }
        TraceEvent traceEvent = (TraceEvent) event;
        for (NacosTraceSubscriber each : subscribers) {
            if (null != each.executor()) {
                each.executor().execute(() -> onEvent0(each, traceEvent));
            } else {
                onEvent0(each, traceEvent);
            }
        }
    }
@Test
    void testOnEventWithExecutor() {
        Executor executor = mock(Executor.class);
        doAnswer(invocationOnMock -> {
            invocationOnMock.getArgument(0, Runnable.class).run();
            return null;
        }).when(executor).execute(any(Runnable.class));
        when(mockInstanceSubscriber.executor()).thenReturn(executor);
        RegisterInstanceTraceEvent event = new RegisterInstanceTraceEvent(1L, "", true, "", "", "", "", 1);
        combinedTraceSubscriber.onEvent(event);
        verify(mockInstanceSubscriber).onEvent(event);
    }