refact testes