Add a unit test for init fsm