public static UriTemplate create(String template, Charset charset) {
    return new UriTemplate(template, true, charset);
  }
@Test
  void simpleTemplateMultipleSequentialExpressions() {
    String template = "https://www.example.com/{foo}{bar}/{baz}/details";
    UriTemplate uriTemplate = UriTemplate.create(template, Util.UTF_8);

    /* verify that the template has 2 variables names foo and bar */
    List<String> uriTemplateVariables = uriTemplate.getVariables();
    assertThat(uriTemplateVariables).contains("foo", "bar", "baz").hasSize(3);

    /* expand the template */
    Map<String, Object> variables = new LinkedHashMap<>();
    variables.put("foo", "first");
    variables.put("bar", "second");
    variables.put("baz", "third");
    String expandedTemplate = uriTemplate.expand(variables);
    assertThat(expandedTemplate)
        .isEqualToIgnoringCase("https://www.example.com/firstsecond/third/details");
    assertThat(URI.create(expandedTemplate)).isNotNull();
  }