UnionConverter implements Converter { @Override public Double convert(final Object object) throws ConversionException { return ((Union) object).getResult().getEstimate(); }  @Override boolean canHandle(final Class clazz); @Override DataType convertedType(); @Override Double convert(final Object object);  }
@Test public void testConverter() throws ConversionException { final Union union = SetOperation.builder().buildUnion(); union.update(1.0D); union.update(2.0D); union.update(3.0D); assertEquals(union.getResult().getEstimate(), UNION_CONVERTER.convert(union), DELTA); final Union emptyUnion = SetOperation.builder().buildUnion(); assertEquals(emptyUnion.getResult().getEstimate(), UNION_CONVERTER.convert(emptyUnion), DELTA); }