@Test
public void testTransform() {

  assertEquals("*", Matcher.all().transform(Functions.constant("foo")).patternString());
  assertSame(Matcher.all(), Matcher.all().transform(Functions.constant("bar")));
  assertEquals("identity/path", Matcher.of("identity/path").transform(Functions.<String>identity()).patternString());
  assertEquals("foo(foo),*", Matcher.of("any(thing),*").transform(Functions.constant("foo")).patternString());
  assertEquals("FOO/*,BAR/*(BAZ)", Matcher.of("foo/*,bar/*(baz)").transform(upperCase()).patternString());
}