@Test public void testRemoveLeadingAndTrailingSlash() { String testString = " String expectedString = "test"; YarnEndpoint yarnEndpoint = new YarnEndpoint("", ""); assertEquals(expectedString, yarnEndpoint.removeLeadingAndTrailingSlash(testString)); }
@VisibleForTesting public String removeLeadingAndTrailingSlash(String s) { return s.replaceAll("^/+", "").replaceAll("/+$", ""); }
YarnEndpoint { @VisibleForTesting public String removeLeadingAndTrailingSlash(String s) { return s.replaceAll("^/+", "").replaceAll("/+$", ""); } }
YarnEndpoint { @VisibleForTesting public String removeLeadingAndTrailingSlash(String s) { return s.replaceAll("^/+", "").replaceAll("/+$", ""); } YarnEndpoint(String apiEndpoint, String path); }
YarnEndpoint { @VisibleForTesting public String removeLeadingAndTrailingSlash(String s) { return s.replaceAll("^/+", "").replaceAll("/+$", ""); } YarnEndpoint(String apiEndpoint, String path); String getApiEndpoint(); void setApiEndpoint(String apiEndpoint); String getContextRoot(); String getVersion(); String getPath(); void setPath(String path); URL getFullEndpointUrl(); @VisibleForTesting String removeLeadingAndTrailingSlash(String s); }
YarnEndpoint { @VisibleForTesting public String removeLeadingAndTrailingSlash(String s) { return s.replaceAll("^/+", "").replaceAll("/+$", ""); } YarnEndpoint(String apiEndpoint, String path); String getApiEndpoint(); void setApiEndpoint(String apiEndpoint); String getContextRoot(); String getVersion(); String getPath(); void setPath(String path); URL getFullEndpointUrl(); @VisibleForTesting String removeLeadingAndTrailingSlash(String s);  }