refactor profile tests