Refacto tests