CardinalityStatistics extends AbstractCardinalityStatistics<CardinalityStatistics> { public void merge(CardinalityStatistics other) { super.count += other.count; distinctData.addAll(other.distinctData); }  void add(Object colObj); Set<Object> getDistinctData(); long getDistinctCount(); void merge(CardinalityStatistics other);  }
@Test(expected = ClassCastException.class) public void testDifferentTypeMerge() throws CardinalityMergeException { AbstractCardinalityStatistics stat1 = new CardinalityHLLStatistics(); stat1.merge(cardStats); }