Fix #684
Add tests
Merge branch 'master' into pr/685
Fix the test decorator to return the class.