@Test
public void simpleTemplateMultipleExpressions() {

  String template = "https://www.example.com/{foo}/{bar}/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").hasSize(2);
  /* expand the template */
  Map<String, Object> variables = new LinkedHashMap<>();
  variables.put("foo", "first");
  variables.put("bar", "second");
  String expandedTemplate = uriTemplate.expand(variables);
  assertThat(expandedTemplate)
      .isEqualToIgnoringCase("https://www.example.com/first/second/details");
  assertThat(URI.create(expandedTemplate)).isNotNull();
}