refactor out duplication between base test classes