extract base logic to base test class