unit test refactorign