JsonNodeSerializer implements Serializer<String, JsonNode> { @Override public byte[] serializeKey(String key) throws SerializationException { return key.getBytes(UTF_8); }  @Override String deserializeKey(byte[] key); @Override JsonNode deserializeValue(byte[] value); @Override byte[] serializeKey(String key); @Override byte[] serializeValue(JsonNode value);  }
@Test public void serializeKey() { byte[] result = underTest.serializeKey(key); assertThat(result, is(keyBytes)); }