Added test cases for passing handler state via init