URLHelper { public static String getDownloadUrl( final Path path, final String clientId ) { return URLHelper.getServletUrl(clientId) + "&" + FileManagerFields.FORM_FIELD_PATH + "=" + URIUtil.encodeQueryString(path.toURI()); }  static String getServletUrl( final String clientId ); static String getDownloadUrl( final Path path,
                                         final String clientId );  }
@Test public void getDownloadUrl() { final Path path = mock(Path.class); when(path.toURI()).thenReturn("default: final String downloadUrl = URLHelper.getDownloadUrl(path, "clientId"); assertEquals("scorecardxls/file?clientId=clientId&attachmentPath=default%3A%2F%2Fmaster%40MySpace%2FMortgages%2Fsrc%2Fmain%2Fresources%2Fa+%26+b.scorecard.xls", downloadUrl); }
@Test public void getDownloadUrl() { final Path path = mock(Path.class); when(path.toURI()).thenReturn("default: final String downloadUrl = URLHelper.getDownloadUrl(path, "clientId"); assertEquals("dtablexls/file?clientId=clientId&attachmentPath=default%3A%2F%2Fmaster%40MySpace%2FMortgages%2Fsrc%2Fmain%2Fresources%2Fa+%26+b.drl", downloadUrl); }