@Override
    public EventPublisher apply(final Class<? extends Event> eventType, final Integer maxQueueSize) {
        Class<? extends Event> cachedEventType = TraceEvent.class;
        
        for (Class<? extends Event> publisherEvent : publisherEvents) {
            if (publisherEvent.isAssignableFrom(eventType)) {
                cachedEventType = publisherEvent;
                break;
            }
        }
        
        return publisher.computeIfAbsent(cachedEventType, eventClass -> {
            TraceEventPublisher result = new TraceEventPublisher();
            result.init(eventClass, maxQueueSize);
            return result;
        });
    }
@Test
    void testApply() {
        TraceEventPublisherFactory.getInstance().apply(TraceTestEvent.TraceTestEvent1.class, Byte.SIZE);
        TraceEventPublisherFactory.getInstance().apply(TraceTestEvent.TraceTestEvent2.class, Byte.SIZE);
        TraceEventPublisherFactory.getInstance().apply(TraceTestEvent.class, Byte.SIZE);
        String expectedStatus = "Trace event publisher statues:\n"
                + "\tPublisher TraceEvent                    : shutdown=false, queue=      0/8      \n";
        assertEquals(expectedStatus, TraceEventPublisherFactory.getInstance().getAllPublisherStatues());
    }