public class AttributeNodeSelectorTest {
protected NodeSelector<JsonNode> build(final String json) throws JSONException {
ObjectNodeImpl node = new ObjectNodeImpl(new JSONObject(json));
return node.buildNodeSelector();
}
@Test
public void testAttributeAsNode() throws Exception {
NodeSelector<JsonNode> selector = build("{ \"a\" : 2, \"b\" : { \"x\" : \"y\" }, \"results\" : [ { \"a\" : 1 }, { \"b\" : 2, \"c\" : 3 } ] }");