add tests for domain module