ParameterizedPathMapping extends AbstractPathMapping { @Override public Set<String> paramNames() { return paramNames; } ParameterizedPathMapping(String pathPattern); @Override Set<String> paramNames(); @Override String patternString(); @Override RoutePathType pathType(); @Override List<String> paths(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override String toString();  }
@Test void testNumericPathParamNames() { final ParameterizedPathMapping m = new ParameterizedPathMapping("/{0}/{1}/{2}"); assertThat(m.paramNames()).containsExactlyInAnyOrder("0", "1", "2"); assertThat(m.apply(create("/alice/bob/charlie")).build().pathParams()) .containsEntry("0", "alice") .containsEntry("1", "bob") .containsEntry("2", "charlie") .hasSize(3); }
@Test void testVariables() throws Exception { final ParameterizedPathMapping ppm = new ParameterizedPathMapping("/service/{value}/test/:value2/something/{value3}"); assertThat(ppm.paramNames()).containsExactlyInAnyOrder("value", "value2", "value3"); }