@Test
public void testMatchJsonPathOnResponse() {

    DocumentContext doc = JsonPath.parse("{ foo: 'bar' }");
    ScenarioContext ctx = getContext();
    ctx.vars.put("response", doc);
    assertTrue(Script.matchNamed(MatchType.EQUALS, "$", null, "{ foo: 'bar' }", ctx).pass);
    assertTrue(Script.matchNamed(MatchType.EQUALS, "$.foo", null, "'bar'", ctx).pass);
}