state controller and state test cases