refacto test service