tests refactorization