add tests for state feature