@Test public void resolveURIWrapsURISyntaxException() throws Exception {

    try {
        ReferenceResolver.resolve(new URI("http://example.com"), "\\\\somethin\010g invalid///");
        fail("did not throw exception for invalid URI");
    } catch (RuntimeException e) {
        assertEquals(URISyntaxException.class, e.getCause().getClass());
    }
}