refactoring tip for unit test