Match { public Match equals(String exp) { return match(exp, MatchType.EQUALS); } Match(String exp);  Match(); private  Match(ScenarioContext context); private  Match(LogAppender appender, String exp); static Match forHttp(LogAppender appender); static Match forHttp(ScenarioContext context); void clear(); static Match init(Object o); Match text(String name, String exp); Match putAll(Map<String, Object> map); Match eval(String exp); Match def(String name, String exp); Match def(String name, Object o); Match get(String key); Match jsonPath(String exp); ScriptValue value(); boolean isBooleanTrue(); String asString(); int asInt(); T asType(Class<T> clazz); Map<String, Object> asMap(String exp); Map<String, Object> asMap(); String asJson(); Map<String, Object> allAsMap(); ScriptValueMap vars(); String allAsJson(); List<Object> asList(String exp); List asList(); Match equalsText(String exp); static String quote(String exp); Match matchText(String exp, MatchType matchType); Match equals(String exp); Match contains(String exp); Match equalsObject(Object o); Match contains(Object o); static Match equals(Object o, String exp); static Match equalsText(Object o, String exp); static Match contains(Object o, String exp); static Match containsText(Object o, String exp); Match config(String key, String value); Match config(Map<String, Object> config);  }
@Test public void testJson() { new Match("{ a: 'foo', b: 1 }").equals("{ b: 1, a: 'foo' }"); new Match("[{ a: 'foo', b: 1 }, { a: 'bar', b: 2 }]").equals("[{ b: 1, a: 'foo' }, { b: 2, a: 'bar' }]"); }
@Test public void testXmlNamespaced() { new Match("<foo:cat xmlns:foo=\"foobar\">a</foo:cat>").equals("<bar:cat xmlns:bar=\"foobar\">a</bar:cat>"); new Match("<foo:cat xmlns:foo=\"foobar\" xmlns:bar=\"https:github.com\"><bar:dog>a</bar:dog></foo:cat>") .equals("<foo2:cat xmlns:foo2=\"foobar\" xmlns:bar2=\"https:github.com\"><bar2:dog>a</bar2:dog></foo2:cat>"); }