@Test
public void testParsePathExpression() {

    assertEquals("foo+bar",
            ObjectPathExpressionParser.parsePathExpression(null, "foo.bar", new DoIt())
                    .toString());
    assertEquals("foo+bar",
            ObjectPathExpressionParser.parsePathExpression(null, "foo[bar]", new DoIt())
                    .toString());
    assertEquals("foo+bar+baz",
            ObjectPathExpressionParser
                    .parsePathExpression(null, "foo[bar].baz", new DoIt())
                    .toString());
    assertEquals(
            "foo+bar[baz]",
            ObjectPathExpressionParser.parsePathExpression(null, "foo[bar[baz]]",
                    new DoIt()).toString());
    assertEquals(
            "foo+bar-bar.baz+fez",
            ObjectPathExpressionParser.parsePathExpression(null, "foo[bar-bar.baz]+fez",
                    new DoIt()).toString());
}