@@ -0,0 +1,914 @@
+package io.micrometer.core.instrument.distribution;%0A%0Aimport io.micrometer.core.instrument.MockClock;%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport java.time.Duration;%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A/**%0A * Tests for %7B@link TimeWindowMax%7D%0A */%0Aclass TimeWindowMaxTest %7B%0A%0A    MockClock clock = new MockClock();%0A    TimeWindowMax timeWindowMax;%0A%0A    @Test%0A    void decaysToZero() %7B%0A        int bufferLength = 3;%0A        long rotateFrequencyMillis = Duration.ofMinutes(1).toMillis();%0A        timeWindowMax = new TimeWindowMax(clock, rotateFrequencyMillis, bufferLength);%0A        timeWindowMax.record(100);%0A%0A        for (int i = 0; i %3C bufferLength; i++) %7B%0A            assertThat(timeWindowMax.poll()).isEqualTo(100);%0A            clock.add(rotateFrequencyMillis, TimeUnit.MILLISECONDS);%0A        %7D%0A%0A        assertThat(timeWindowMax.poll()).isZero();%0A    %7D%0A%7D%0A

Test for TimeWindowMax