@Override
    public DoubleMaximum clone() {
        DoubleMaximum clone = new DoubleMaximum();
        clone.max = this.max;
        return clone;
    }
@Test
    void testClone() {
        DoubleMaximum max = new DoubleMaximum();
        double value = 3.14159265359;

        max.add(value);

        DoubleMaximum clone = max.clone();
        assertThat(clone.getLocalValue()).isCloseTo(value, within(0.0));
    }