DRYed up the tests into a base class