@Test
public void shouldHandleInvalidMBeanObjectName() throws Exception {

    // given
    GaugeConfig gaugeConfig = ImmutableGaugeConfig.builder()
            .mbeanObjectName("invalid mbean object name")
            .build();
    // when
    List<GaugeValue> gaugeValues =
            collectGaugeValues(gaugeConfig);
    // then
    assertThat(gaugeValues).isEmpty();
    verify(logger).debug(anyString(), any(Exception.class));
    verify(logger).warn(eq("error accessing mbean: {}"), eq("invalid mbean object name"),
            any(MalformedObjectNameException.class));
}