@Test
public void shouldCaptureNonCounterGauge() throws Exception {

    // given
    GaugeConfig gaugeConfig = ImmutableGaugeConfig.builder()
            .mbeanObjectName("test:aaa=bbb")
            .addMbeanAttributes(ImmutableMBeanAttribute.of("ccc", false))
            .build();
    when(lazyPlatformMBeanServer.getAttribute(any(ObjectName.class), anyString(),
            anyMBeanServerList())).thenReturn(555);
    // when
    List<GaugeValue> gaugeValues =
            collectGaugeValues(gaugeConfig);
    // then
    assertThat(gaugeValues).hasSize(1);
    assertThat(gaugeValues.get(0).getValue()).isEqualTo(555);
    assertThat(gaugeValues.get(0).getWeight()).isEqualTo(1);
}