public <C extends StatefulContext> void callOnEventTriggered(EventEnum event, StateEnum stateFrom, StateEnum stateTo, C context) throws Exception {
        Handler h = handlers.get(new HandlerType(EventType.EVENT_TRIGGER, event, null));
        if (h != null) {
            ContextHandler<C> contextHandler = (ContextHandler<C>) h;
            contextHandler.call(context);
        }

        h = handlers.get(new HandlerType(EventType.ANY_EVENT_TRIGGER, null, null));
        if (h != null) {
            EventHandler<C> eventHandler = (EventHandler<C>) h;
            eventHandler.call(event, stateFrom, stateTo, context);
        }
    }