@Test
public void subTemplate() {

    AddressTemplate at = AddressTemplate.of("{a}/b=c/{d}=e/f=g"); // 4 tokens
    assertEquals("", at.subTemplate(0, 0).getTemplate());
    assertEquals("", at.subTemplate(2, 2).getTemplate());
    assertEquals("b=c", at.subTemplate(1, 2).getTemplate());
    assertEquals("{d}=e/f=g", at.subTemplate(2, 4).getTemplate());
    assertEquals(at, at.subTemplate(0, 4));
}