Add a unit test for domains module