@Test
public void returnsJmxAttribute() throws Exception {

    ObjectName objectName = new ObjectName("java.lang:type=ClassLoading");
    JmxAttributeGauge gauge = new JmxAttributeGauge(mBeanServer, objectName, "LoadedClassCount");
    assertThat(gauge.getValue()).isInstanceOf(Integer.class);
    assertThat((Integer) gauge.getValue()).isGreaterThan(0);
}