use set_domain method

Rather than reaching straight in to use the attr_writer on the class.
Convert from class to instance methods

so that we can wrap multiple checks inside a single test.