@Test
public void replaceWildcards() {

    AddressTemplate at = AddressTemplate.of("a=b");
    at = at.replaceWildcards(null);
    assertEquals("a=b", at.getTemplate());
    at = AddressTemplate.of("a=b");
    at = at.replaceWildcards(null, (String[]) null);
    assertEquals("a=b", at.getTemplate());
    at = AddressTemplate.of("a=b");
    at = at.replaceWildcards("foo");
    assertEquals("a=b", at.getTemplate());
    at = AddressTemplate.of("{a}/b={c}");
    at = at.replaceWildcards("foo");
    assertEquals("{a}/b={c}", at.getTemplate());
    at = AddressTemplate.of("a=*/c=*");
    at = at.replaceWildcards("b");
    assertEquals("a=b/c=*", at.getTemplate());
    at = AddressTemplate.of("a=*/c=*");
    at = at.replaceWildcards("b", (String[]) null);
    assertEquals("a=b/c=*", at.getTemplate());
    at = AddressTemplate.of("a=*/c=*");
    at = at.replaceWildcards("b", "d");
    assertEquals("a=b/c=d", at.getTemplate());
    at = AddressTemplate.of("a=*/c=*");
    at = at.replaceWildcards("b", "d", "foo");
    assertEquals("a=b/c=d", at.getTemplate());
    at = AddressTemplate.of("a=*/c={d}");
    at = at.replaceWildcards("b", "d", "foo");
    assertEquals("a=b/c={d}", at.getTemplate());
}