### Question:
JsonNodeSerde implements Serde<JsonNode>, Serializer<JsonNode>, Deserializer<JsonNode> { @Override public JsonNode deserialize(String topic, byte[] data) { if (data == null) { return null; } try { return mapper.readTree(data); } catch (Exception e) { throw new SerializationException("Error deserializing from " + new String(data), e); } } JsonNodeSerde(); @Override void configure(Map<String, ?> configs, boolean isKey); @Override byte[] serialize(String topic, JsonNode data); @Override JsonNode deserialize(String topic, byte[] data); @Override void close(); @Override Serializer<JsonNode> serializer(); @Override Deserializer<JsonNode> deserializer();  }### Answer:
@Test public void deserialize() throws Exception { byte[] json = StreamUtils.copyToByteArray(getClass().getResourceAsStream("JsonNodeSerdeTest.json")); JsonNode node = new JsonNodeSerde().deserialize(null, json); assertThat(node.get("schema").get("name").textValue()).isEqualTo("fb-connect.public.players.Envelope"); assertThat(node.get("payload").get("before").textValue()).isNull(); assertThat(node.get("payload").get("after").get("id").intValue()).isEqualTo(1); assertThat(node.get("payload").get("after").get("name").textValue()).isEqualTo("Player One"); assertThat(node.get("payload").get("op").textValue()).isEqualTo("c"); }