@SuppressWarnings("unchecked")
    private final void registerEventHandlers() {
        for (final Method method : getClass().getDeclaredMethods()) {
            if (isUnannotatedMethod(method)) {
                addMethodAsEventHandler((Class<? extends DomainEvent>) method.getParameterTypes()[0], method);
            } else if (isEventHandler(method)) {
                final EventHandler annotation = method.getAnnotation(EventHandler.class);
                addMethodAsEventHandler(annotation.event(), method);
            } else if (isEntityEventHandler(method)) {
                final EntityEventHandler annotation = method.getAnnotation(EntityEventHandler.class);
                for (final Class<? extends DomainEvent> eventType : annotation.events()) {
                    addMethodAsEventHandler(eventType, method);
                }
                continue;
            }
        }
    }