Refactor services tests