Add a state integration test case for #5940.