@Test public void urlError() throws Exception { VfsResourceReference reference = new VfsResourceReference( URI.create("attach:xwiki:space.page@attachment"), "path1/path2/test.txt"); when(manager.getURL(reference)).thenThrow(new VfsException("error")); assertNull(this.scriptService.url( new VfsResourceReference(URI.create("attach:xwiki:space.page@attachment"), "path1/path2/test.txt"))); }
public String url(VfsResourceReference reference) { try { return this.vfsManager.getURL(reference); } catch (Exception e) { return null; } }
VfsScriptService implements ScriptService { public String url(VfsResourceReference reference) { try { return this.vfsManager.getURL(reference); } catch (Exception e) { return null; } } }
VfsScriptService implements ScriptService { public String url(VfsResourceReference reference) { try { return this.vfsManager.getURL(reference); } catch (Exception e) { return null; } }  }
VfsScriptService implements ScriptService { public String url(VfsResourceReference reference) { try { return this.vfsManager.getURL(reference); } catch (Exception e) { return null; } }  String url(VfsResourceReference reference); @Unstable String url(VfsResourceReference reference, String contentType); }
VfsScriptService implements ScriptService { public String url(VfsResourceReference reference) { try { return this.vfsManager.getURL(reference); } catch (Exception e) { return null; } }  String url(VfsResourceReference reference); @Unstable String url(VfsResourceReference reference, String contentType);  }