HyperLogLogPlusConverter implements Converter { @Override public Long convert(final Object object) throws ConversionException { return ((HyperLogLogPlus) object).cardinality(); }  @Override boolean canHandle(final Class clazz); @Override DataType convertedType(); @Override Long convert(final Object object);  }
@Test public void testConverter() throws ConversionException { final HyperLogLogPlus hyperLogLogPlus = new HyperLogLogPlus(5, 5); hyperLogLogPlus.offer("A"); hyperLogLogPlus.offer("B"); assertEquals(hyperLogLogPlus.cardinality(), (long) HYPER_LOG_LOG_PLUS_CONVERTER.convert(hyperLogLogPlus)); final HyperLogLogPlus emptyHyperLogLogPlus = new HyperLogLogPlus(5, 5); assertEquals(emptyHyperLogLogPlus.cardinality(), (long) HYPER_LOG_LOG_PLUS_CONVERTER.convert(emptyHyperLogLogPlus)); }