Tidy and refactor test suite

Here is a first pass at addressing task #13.

I think there are plenty of opportunities to factor out repeated code, as similar schemas and test data are repeated across various tests. Some of the testing source files are rather large, but hopefully this will help trim them down.

Hopefully this should also help us spot if we are missing key tests.