Factorization of test class.