@Test
public void returnsNullIfMBeanNotFound() throws Exception {

    ObjectName objectName = new ObjectName("foo.bar:type=NoSuchMBean");
    JmxAttributeGauge gauge = new JmxAttributeGauge(mBeanServer, objectName, "LoadedClassCount");
    assertThat(gauge.getValue()).isNull();
}