### Question:
UpdateQueryExpression extends QueryExpression { public static QueryExpression fromJson(JsonNode node) { if (node instanceof TextNode && "$all".equals(node.asText())) { return new AllMatchExpression(); } else { return QueryExpression.fromJson(node); } }  static QueryExpression fromJson(JsonNode node);  }### Answer:
@Test public void testFromJson() throws IOException { JsonNode node; QueryExpression expResult; QueryExpression result; node = JsonUtils.json("\"$all\""); result = UpdateQueryExpression.fromJson(node); expResult = new AllMatchExpression(); assertEquals(expResult, result); result = UpdateQueryExpression.fromJson(JsonUtils.json("{\"field\":\"field6.nf1\",\"regex\":\"Nvalue.*\"}")); assertNotEquals(expResult, result); }