Remove test setup duplication

By generalising to a super test class with each type of test class
defined in itself