public static String unescapePathSegment(String segment)
  {
    if (segment.equals("$*"))
    {
      return PathSpec.WILDCARD;
    }

    return unescape(segment);
  }
@Test
  public void testUnescapePathSegment()
  {
    assertEquals(Escaper.unescapePathSegment("*"), "*");
    assertEquals(Escaper.unescapePathSegment("$$*"), "$*");
    assertTrue(Escaper.unescapePathSegment("$*") == PathSpec.WILDCARD);
    assertFalse(Escaper.unescapePathSegment("*") == PathSpec.WILDCARD);
    assertFalse(Escaper.unescapePathSegment("$$*") == PathSpec.WILDCARD);
  }