class ClickListenerRegistry implements Function<String, BiConsumer<MenuItemClick, Map<String, Object>>>,
        ListenerRegistry<String, BiConsumer<MenuItemClick, Map<String, Object>>> {

    @Override
    public RegisteredListener<String, BiConsumer<MenuItemClick, Map<String, Object>>> registerListener(
            String name, BiConsumer<MenuItemClick, Map<String, Object>> handler, boolean override) {

        Preconditions.checkNotNull(name, "Null name");
        Preconditions.checkNotNull(handler, "Null handler");
        RegisteredListener<String, BiConsumer<MenuItemClick, Map<String, Object>>> previous = registryMap.get(name);
        if (previous != null && !override) {
            LOGGER.warning(() -> String.format("Listener with name %s already exists. If you want to override it, enable override flag", name));
            return previous;
        }
        handler = processHandler(handler);
        RegisteredListener<String, BiConsumer<MenuItemClick, Map<String, Object>>> listener = ListenerRegistries.newRegisteredListener(name, handler);
        registryMap.put(name, listener);
        return listener;
    }

    public  ClickListenerRegistry(Map<String, RegisteredListener<String, BiConsumer<MenuItemClick, Map<String, Object>>>> registryMap);
    public  ClickListenerRegistry();

}