Refacctor tests