Add test suite. Fixes #4