@Test
public void includesAGaugeForDirectMemoryUsed() throws Exception {

    final Gauge gauge = (Gauge) buffers.getMetrics().get("direct.used");
    when(mBeanServer.getAttribute(direct, "MemoryUsed")).thenReturn(100);
    assertThat(gauge.getValue())
            .isEqualTo(100);
}