@Override
    public void addSubscriber(Subscriber subscriber) {
        addSubscriber(subscriber, subscriber.subscribeType());
    }
@Test
    void testAddSubscriber() {
        when(subscriber.subscribeType()).thenReturn(TraceTestEvent.TraceTestEvent1.class);
        traceEventPublisher.addSubscriber(subscriber);
        traceEventPublisher.addSubscriber(smartSubscriber, TraceTestEvent.TraceTestEvent2.class);
        TraceTestEvent.TraceTestEvent1 traceTestEvent1 = new TraceTestEvent.TraceTestEvent1();
        TraceTestEvent.TraceTestEvent2 traceTestEvent2 = new TraceTestEvent.TraceTestEvent2();
        traceEventPublisher.publish(traceTestEvent1);
        traceEventPublisher.publish(traceTestEvent2);
        ThreadUtils.sleep(2000L);
        verify(subscriber).onEvent(traceTestEvent1);
        verify(smartSubscriber).onEvent(traceTestEvent2);
    }