Issue #163: Convert test variables to the state system.
Merge pull request #382 from hellomrcat/state-test

Issue #163: Convert test variables to the state system.