### Question:
DecimalColumnStatsMerger extends ColumnStatsMerger { public void setHighValue(DecimalColumnStatsDataInspector aggregateData, DecimalColumnStatsDataInspector newData) { final Decimal aggregateHighValue = aggregateData.getHighValue(); final Decimal newHighValue = newData.getHighValue(); final Decimal mergedHighValue; if (!aggregateData.isSetHighValue() && !newData.isSetHighValue()) { return; } else if (aggregateData.isSetHighValue() && newData.isSetHighValue()) { mergedHighValue = ObjectUtils.max(aggregateHighValue, newHighValue); } else { mergedHighValue = MoreObjects.firstNonNull(aggregateHighValue, newHighValue); } aggregateData.setHighValue(mergedHighValue); }  @Override void merge(ColumnStatisticsObj aggregateColStats, ColumnStatisticsObj newColStats); void setLowValue(DecimalColumnStatsDataInspector aggregateData, DecimalColumnStatsDataInspector newData); void setHighValue(DecimalColumnStatsDataInspector aggregateData, DecimalColumnStatsDataInspector newData);  }### Answer:
@Test public void testCompareSimple() { DecimalColumnStatsDataInspector data1 = new DecimalColumnStatsDataInspector(DATA_3); DecimalColumnStatsDataInspector data2 = new DecimalColumnStatsDataInspector(DATA_5); merger.setHighValue(data1, data2); Assert.assertEquals(DECIMAL_5, data1.getHighValue()); }
@Test public void testCompareSimpleFlipped() { DecimalColumnStatsDataInspector data1 = new DecimalColumnStatsDataInspector(DATA_5); DecimalColumnStatsDataInspector data2 = new DecimalColumnStatsDataInspector(DATA_3); merger.setHighValue(data1, data2); Assert.assertEquals(DECIMAL_5, data1.getHighValue()); }
@Test public void testCompareUnscaledValue() { DecimalColumnStatsDataInspector data1 = new DecimalColumnStatsDataInspector(DATA_3); DecimalColumnStatsDataInspector data2 = new DecimalColumnStatsDataInspector(DATA_20); merger.setHighValue(data1, data2); Assert.assertEquals(DECIMAL_20, data1.getHighValue()); }
@Test public void testCompareNullsMax() { DecimalColumnStatsDataInspector data1 = new DecimalColumnStatsDataInspector(); DecimalColumnStatsDataInspector data2 = new DecimalColumnStatsDataInspector(); merger.setHighValue(data1, data2); Assert.assertNull(data1.getHighValue()); }
@Test public void testCompareFirstNullMax() { DecimalColumnStatsDataInspector data1 = new DecimalColumnStatsDataInspector(DATA_3); DecimalColumnStatsDataInspector data2 = new DecimalColumnStatsDataInspector(); merger.setHighValue(data1, data2); Assert.assertEquals(DECIMAL_3, data1.getHighValue()); }
@Test public void testCompareSecondNullMax() { DecimalColumnStatsDataInspector data1 = new DecimalColumnStatsDataInspector(); DecimalColumnStatsDataInspector data2 = new DecimalColumnStatsDataInspector(DATA_3); merger.setHighValue(data1, data2); Assert.assertEquals(DECIMAL_3, data1.getHighValue()); }