Write tests for triggerAction and getActionsWithHandlers