refactor domain tests