### Question:
ObjectNodeTypeAdapter implements CustomTypeAdapter<Object> { @Override public CustomTypeValue<?> encode(Object value) { if (!(value instanceof ObjectNode)) { throw new IllegalArgumentException("Expected 'ObjectNode', got: " + value); } return CustomTypeValue.fromRawValue(value); }  @Override CustomTypeValue<?> encode(Object value); @Override Object decode(CustomTypeValue value);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void encodeNotObject() { underTest.encode(1); }
@Test public void encode() { var result = (GraphQLString) underTest.encode(mapper.createObjectNode()); assertThat(result.value, is("{}")); }