[liujing] use Uri instead of self code
[liujing] add tests for relative uri