@Test
public void testContextPathExpression2() {

    String inputExpression = "{ x : { y : \"foo\" } }.x.y";
    BaseNode pathBase = parse( inputExpression );
    assertThat( pathBase, is( instanceOf( PathExpressionNode.class ) ) );
    assertThat( pathBase.getText(), is( inputExpression ) );
    assertThat( pathBase.getResultType(), is( BuiltInType.STRING ) );
    PathExpressionNode pathExpr = (PathExpressionNode) pathBase;
    assertThat( pathExpr.getExpression(), is( instanceOf( ContextNode.class ) ) );
    assertThat( pathExpr.getExpression().getText(), is( "{ x : { y : \"foo\" } }" ) );
    assertThat( pathExpr.getName(), is( instanceOf( QualifiedNameNode.class ) ) );
    assertThat( pathExpr.getName().getText(), is( "x.y" ) );
}