YarnClusterResourceURLBuilder { public static String buildRunningAppsURL(String urlBase) { return PathResolverHelper.buildUrlPath(urlBase, CLUSTER_APPS_API_URL + "?state=RUNNING&" + 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 testBuildRunningAppsURLWithBaseURLTailingSlash() { String resolvedUrl = YarnClusterResourceURLBuilder.buildRunningAppsURL(BASE_URL_WITH_TAILING_SLASH); Assert.assertEquals("unexpected url composed for fetching running apps", EXPECTED_RUNNING_APP_URL, resolvedUrl); }
@Test public void testBuildRunningAppsURLWithoutBaseURLTailingSlash() { String resolvedUrl = YarnClusterResourceURLBuilder.buildRunningAppsURL(BASE_URL_WITHOUT_TAILING_SLASH); Assert.assertEquals("unexpected url composed for fetching running apps", EXPECTED_RUNNING_APP_URL, resolvedUrl); }