public static Object parse(String element) throws PathSegment.PathSegmentSyntaxException
  {
    Queue<Token> tokens = tokenizeElement(element);
    Object result = parseElement(tokens);

    if (!tokens.isEmpty())
    {
      throw new PathSegment.PathSegmentSyntaxException("tokens left over after parsing; first excess token: " + tokens.peek().toErrorString() );
    }

    return result;
  }
@Test(dataProvider = "unicode")
  public void testUnicode(String decodable, Object expectedObj) throws PathSegment.PathSegmentSyntaxException
  {
    Object actualObj = URIElementParser.parse(decodable);
    Assert.assertEquals(actualObj, expectedObj);
  }