Fix cyclomatic complexity in test base class