refacto tests