YarnClusterResourceURLBuilder { public static String buildFinishedAppsURL(String urlBase) { return PathResolverHelper.buildUrlPath(urlBase, CLUSTER_APPS_API_URL + "?state=FINISHED" + "&" + ANONYMOUS_PARAMETER); }  static String buildSchedulerInfoURL(String urlBase); static String buildClusterMetricsURL(String urlBase); static String buildRunningAppsURL(String urlBase); static String buildAcceptedAndRunningAppsURL(String urlBase); static String buildAcceptedAppsURL(String urlBase); static String buildAcceptedAppTrackingURL(String urlBase, String appId); static String buildFinishedAppsURL(String urlBase);  }
@Test public void testBuildFinishedAppsURLWithBaseURLTailingSlash() { String resolvedUrl = YarnClusterResourceURLBuilder.buildFinishedAppsURL(BASE_URL_WITH_TAILING_SLASH); Assert.assertEquals("unexpected url composed for fetching finished apps", EXPECTED_FINISHED_APPS_URL, resolvedUrl); }
@Test public void testBuildFinishedAppsURLWithoutBaseURLTailingSlash() { String resolvedUrl = YarnClusterResourceURLBuilder.buildFinishedAppsURL(BASE_URL_WITHOUT_TAILING_SLASH); Assert.assertEquals("unexpected url composed for fetching finished apps", EXPECTED_FINISHED_APPS_URL, resolvedUrl); }