Refactor domain check tests