EnrichmentConverter extends AbstractConverter<EnrichmentKey, EnrichmentValue> { @Override public LookupKV<EnrichmentKey, EnrichmentValue> fromPut(Put put, String columnFamily) throws IOException { return fromPut(put, columnFamily, new EnrichmentKey(), new EnrichmentValue()); }  @Override LookupKV<EnrichmentKey, EnrichmentValue> fromPut(Put put, String columnFamily); @Override LookupKV<EnrichmentKey, EnrichmentValue> fromResult(Result result, String columnFamily);  }
@Test public void testValueConversion() throws IOException { EnrichmentConverter converter = new EnrichmentConverter(); EnrichmentKey k1 = new EnrichmentKey("type", "indicator"); EnrichmentValue v1 = new EnrichmentValue(new HashMap<String, Object>() {{ put("k1", "v1"); put("k2", "v2"); }}); Put serialized = converter.toPut("cf", k1, v1); LookupKV<EnrichmentKey, EnrichmentValue> kv = converter.fromPut(serialized,"cf"); assertEquals(k1, kv.getKey()); assertEquals(v1, kv.getValue()); }