@Override
    public Object getValue() {
        try {
            return mBeanServerConn.getAttribute(getObjectName(), attributeName);
        } catch (IOException e) {
            return null;
        } catch (JMException e) {
            return null;
        }
    }
@Test
    public void returnsAttributeForObjectNamePattern() throws Exception {
        ObjectName objectName = new ObjectName("JmxAttributeGaugeTest:name=test1,*");
        JmxAttributeGauge gauge = new JmxAttributeGauge(mBeanServer, objectName, "Value");

        assertThat(gauge.getValue()).isInstanceOf(Long.class);
        assertThat((Long) gauge.getValue()).isEqualTo(Long.MAX_VALUE);
    }