completed test duplication refactoring