Added unit tests for DomainService.