### Question:
ObjectNodeCoercing extends BaseCoercing { @Override public Object parseValue(Object input) throws CoercingParseValueException { try { JsonNode jsonNode = mapper.readTree(input.toString()); if (!jsonNode.isObject()) { throw new CoercingParseValueException("Expected 'ObjectNode', got: " + jsonNode); } return jsonNode; } catch (IOException e) { log.error("Error parsing value: {}", input, e); throw new CoercingParseValueException(e); } }  @Override Object parseValue(Object input); @Override Object parseLiteral(Object input, Map<String, Object> variables);  }### Answer:
@Test public void parseValueObjectNode() { Object result = underTest.parseValue("{\"a\":\"b\"}"); assertThat(result, is(mapper.createObjectNode().put("a", "b"))); }
@Test(expected = CoercingParseValueException.class) public void parseValueNotAnObjectNode() { underTest.parseValue("[]"); }
@Test(expected = CoercingParseValueException.class) public void parseValueNotValidJson() { underTest.parseValue("{"); }