Add type annotations to `tests.state.test_v2`.