Fixes #39: Remove duplication across BaseUnitTestCase, BaseFunctionalTestCase and BaseIntegrationTestCase