@Test public void keeps_first_mapping_only() { ServletContext servletContext = servletContext( servletRegistration(asList("what/*", "the", "hell")), "w00t", "/prefix/" ); assertThat(contextPath(servletContext, "w00t")).isEqualTo("/prefix/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);  }