Api2UrlService { public String getRecordPortalUrl(String collectionId, String itemId) { return getRecordPortalUrl("/" + collectionId + "/" +itemId); } Api2UrlService(String portalBaseUrl, String api2BaseUrl, String apikeyValidateUrl, String apiGatewayBaseUrl); static Api2UrlService getBeanInstance(); String getPortalBaseUrl(); String getApi2BaseUrl(); String getApikeyValidateUrl(); String getRecordPortalUrl(String collectionId, String itemId); String getApiGatewayBaseUrl(); String getRecordPortalUrl(String europeanaId); @Deprecated String getRecordResolveUrl(String europeanaId); String getRecordApi2Url(String collectionId, String itemId, String wskey); String getRecordApi2Url(String europeanaId, String wskey); String getThumbnailUrl(String uri, String type); String getThumbnailUrl(String uri, String size, String type); @Deprecated String getRedirectUrl(String wskey, String isShownAtUri, String provider, String europeanaId, String profile); static final String API_BASEURL; }
@Test public void testGetRecordPortalUrl() { String baseUrl = null; Api2UrlService s1 = new Api2UrlService(baseUrl, null, null, null); assertEquals("https: baseUrl = "pro.europeana.eu"; Api2UrlService s2 = new Api2UrlService(baseUrl, null, null, null); assertEquals("https: baseUrl = "http: Api2UrlService s3 = new Api2UrlService(baseUrl, null, null, null); assertEquals("http: }