Add tests for state object