@Override
    public void merge(Accumulator<Double, Double> other) {
        this.max = Math.max(this.max, other.getLocalValue());
    }
@Test
    void testMerge() {
        DoubleMaximum max1 = new DoubleMaximum();
        max1.add(1234.5768);

        DoubleMaximum max2 = new DoubleMaximum();
        max2.add(5678.9012);

        max2.merge(max1);
        assertThat(max2.getLocalValue()).isCloseTo(5678.9012, within(0.0));

        max1.merge(max2);
        assertThat(max1.getLocalValue()).isCloseTo(5678.9012, within(0.0));
    }