Add more test, and genericise the tests more.