Added tests/documentation for State.