### Question:
RealHistogramAggregation { @CombineFunction public static void merge(@AggregationState DoubleHistogramAggregation.State state, @AggregationState DoubleHistogramAggregation.State other) { DoubleHistogramAggregation.merge(state, other); } private  RealHistogramAggregation(); @InputFunction static void add(@AggregationState DoubleHistogramAggregation.State state, @SqlType(StandardTypes.BIGINT) long buckets, @SqlType(StandardTypes.REAL) long value, @SqlType(StandardTypes.DOUBLE) double weight); @InputFunction static void add(@AggregationState DoubleHistogramAggregation.State state, @SqlType(StandardTypes.BIGINT) long buckets, @SqlType(StandardTypes.REAL) long value); @CombineFunction static void merge(@AggregationState DoubleHistogramAggregation.State state, @AggregationState DoubleHistogramAggregation.State other); @OutputFunction("map(real,real)") static void output(@AggregationState DoubleHistogramAggregation.State state, BlockBuilder out);  }### Answer:
@Test public void testMerge() { Accumulator singleStep = factory.createAccumulator(); singleStep.addInput(input); Block singleStepResult = getFinalBlock(singleStep); Accumulator partialStep = factory.createAccumulator(); partialStep.addInput(input); Block intermediate = getIntermediateBlock(partialStep); Accumulator finalStep = factory.createAccumulator(); finalStep.addIntermediate(intermediate); finalStep.addIntermediate(intermediate); Block actual = getFinalBlock(finalStep); Map<Float, Float> expected = Maps.transformValues(extractSingleValue(singleStepResult), value -> value * 2); assertEquals(extractSingleValue(actual), expected); }