@Test
public void invalidParameterSegment() {

  String invalids = "?#[]{}";
  for (char c : invalids.toCharArray()) {
    try {
      PathTrie.<Integer> builder().add(HttpMethod.GET, "bad/" + c, 1234);
      fail("expected IllegalArgumentException");
    } catch (IllegalArgumentException e) {
      // expected
    }
  }
}