JsonNodeSerializer implements Serializer<String, JsonNode> { @Override public byte[] serializeValue(JsonNode value) throws SerializationException { try { return mapper.writeValueAsBytes(value); } catch (JsonProcessingException e) { throw new SerializationException(e); } }  @Override String deserializeKey(byte[] key); @Override JsonNode deserializeValue(byte[] value); @Override byte[] serializeKey(String key); @Override byte[] serializeValue(JsonNode value);  }
@Test public void serializeValue() { byte[] result = underTest.serializeValue(value); assertThat(result, is(valueBytes)); }