added unit test case and fixed build (we can't rely on Uri being a class)