tests: assert the state prior to mutating it as well as afterward