Added tests and fixed bugs on Uri domain() method