@Test
public void testGetRecordPortalUrl() {

    String baseUrl = null;
    Api2UrlService s1 = new Api2UrlService(baseUrl, null, null, null);
    assertEquals("https://www.europeana.eu/item/1/2", s1.getRecordPortalUrl("/1/2"));
    baseUrl = "pro.europeana.eu";
    Api2UrlService s2 = new Api2UrlService(baseUrl, null, null, null);
    // In this case https:// is added by UrlBuilder class!
    assertEquals("https://pro.europeana.eu/item/x/y", s2.getRecordPortalUrl("/x/y"));
    baseUrl = "http://localhost:8080";
    Api2UrlService s3 = new Api2UrlService(baseUrl, null, null, null);
    assertEquals("http://localhost:8080/item/x/y", s3.getRecordPortalUrl("/x/y"));
}