refactor the legal profile test