@@ -0,0 +1,2336 @@
+/**%0A * Copyright 2017 Pivotal Software, Inc.%0A * %3Cp%3E%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %3Cp%3E%0A * http://www.apache.org/licenses/LICENSE-2.0%0A * %3Cp%3E%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage io.micrometer.core.instrument;%0A%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.mockito.Mockito.mock;%0A%0A/**%0A * Tests for %7B@link Meter%7D.%0A *%0A * @author Johnny Lim%0A */%0Aclass MeterTest %7B%0A%0A    @Test%0A    void matchWhenTimeGaugeShouldUseFunctionForTimeGauge() %7B%0A        String matched = Meter.Type.match(%0A                mock(TimeGauge.class),%0A                (gauge) -%3E %22gauge%22,%0A                (counter) -%3E %22counter%22,%0A                (timer) -%3E %22timer%22,%0A                (distributionSummary) -%3E %22distributionSummary%22,%0A                (longTaskTimer) -%3E %22longTaskTimer%22,%0A                (timeGauge) -%3E %22timeGauge%22,%0A                (functionCounter) -%3E %22functionCounter%22,%0A                (functionTimer) -%3E %22functionTimer%22,%0A                (meter) -%3E %22meter%22);%0A        assertThat(matched).isEqualTo(%22timeGauge%22);%0A    %7D%0A%0A    @Test%0A    void consumeWhenTimeGaugeShouldUseConsumerForTimeGauge() %7B%0A        StringBuilder consumed = new StringBuilder();%0A        Meter.Type.consume(%0A                mock(TimeGauge.class),%0A                (gauge) -%3E consumed.append(%22gauge%22),%0A                (counter) -%3E consumed.append(%22counter%22),%0A                (timer) -%3E consumed.append(%22timer%22),%0A                (distributionSummary) -%3E consumed.append(%22distributionSummary%22),%0A                (longTaskTimer) -%3E consumed.append(%22longTaskTimer%22),%0A                (timeGauge) -%3E consumed.append(%22timeGauge%22),%0A                (functionCounter) -%3E consumed.append(%22functionCounter%22),%0A                (functionTimer) -%3E consumed.append(%22functionTimer%22),%0A                (meter) -%3E consumed.append(%22meter%22));%0A        assertThat(consumed.toString()).isEqualTo(%22timeGauge%22);%0A    %7D%0A%0A%7D%0A

Add tests for match() and consume() in Meter.Type