@Test
public void ignoresGaugesForObjectsWhichCannotBeFound() throws Exception {

    when(mBeanServer.getMBeanInfo(mapped)).thenThrow(new InstanceNotFoundException());
    assertThat(buffers.getMetrics().keySet())
            .containsOnly(DIRECT_COUNT,
                          DIRECT_USED,
                          DIRECT_CAPACITY);
}