[Closes #21] Added tests for state record and type rule.