Added tests for init and handleStateTrigger