@Test
public void returnsNullIfThereIsAnException() throws Exception {

    when(mBeanServer.getAttribute(objectName, "attr")).thenThrow(new AttributeNotFoundException());
    assertThat(gauge.getValue())
            .isNull();
}