test packages refactor