Tests that the authorized function is called by the component.