Making classes testable