refactor service test