Add a test for RunState class, replacing former higher-level test