@Test public void no_double_slash_when_context_path_is_slash() { ServletContext servletContext = servletContext( servletRegistration(asList("/what")), "w00t", "/" ); assertThat(contextPath(servletContext, "w00t")).isEqualTo("/what"); }
public static String contextPath(ServletContext servletContext, String registeredKey) { String mappedPath = readMappingOrDefault(servletContext, registeredKey); return trimSingleSlashContextPath(servletContext) + mappedPath; }
ContextPaths { public static String contextPath(ServletContext servletContext, String registeredKey) { String mappedPath = readMappingOrDefault(servletContext, registeredKey); return trimSingleSlashContextPath(servletContext) + mappedPath; } }
ContextPaths { public static String contextPath(ServletContext servletContext, String registeredKey) { String mappedPath = readMappingOrDefault(servletContext, registeredKey); return trimSingleSlashContextPath(servletContext) + mappedPath; }  }
ContextPaths { public static String contextPath(ServletContext servletContext, String registeredKey) { String mappedPath = readMappingOrDefault(servletContext, registeredKey); return trimSingleSlashContextPath(servletContext) + mappedPath; }  static String contextPath(ServletContext servletContext, String registeredKey); }
ContextPaths { public static String contextPath(ServletContext servletContext, String registeredKey) { String mappedPath = readMappingOrDefault(servletContext, registeredKey); return trimSingleSlashContextPath(servletContext) + mappedPath; }  static String contextPath(ServletContext servletContext, String registeredKey);  }