### Question:
StatisticRange { public StatisticRange addAndSumDistinctValues(StatisticRange other) { double newDistinctValues = distinctValues + other.distinctValues; return new StatisticRange(minExcludeNaN(low, other.low), maxExcludeNaN(high, other.high), newDistinctValues); } StatisticRange(double low, double high, double distinctValues); static StatisticRange empty(); static StatisticRange from(SymbolStatsEstimate estimate); double getLow(); double getHigh(); double getDistinctValuesCount(); double length(); boolean isEmpty(); double overlapPercentWith(StatisticRange other); StatisticRange intersect(StatisticRange other); StatisticRange addAndSumDistinctValues(StatisticRange other); StatisticRange addAndMaxDistinctValues(StatisticRange other); StatisticRange addAndCollapseDistinctValues(StatisticRange other); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testAddAndSumDistinctValues() { assertEquals(unboundedRange(NaN).addAndSumDistinctValues(unboundedRange(NaN)), unboundedRange(NaN)); assertEquals(unboundedRange(NaN).addAndSumDistinctValues(unboundedRange(1)), unboundedRange(NaN)); assertEquals(unboundedRange(1).addAndSumDistinctValues(unboundedRange(NaN)), unboundedRange(NaN)); assertEquals(unboundedRange(1).addAndSumDistinctValues(unboundedRange(2)), unboundedRange(3)); assertEquals(StatisticRange.empty().addAndSumDistinctValues(StatisticRange.empty()), StatisticRange.empty()); assertEquals(range(0, 1, 1).addAndSumDistinctValues(StatisticRange.empty()), range(0, 1, 1)); assertEquals(range(0, 1, 1).addAndSumDistinctValues(range(1, 2, 1)), range(0, 2, 2)); }