### Question:
DefaultMetricsReader implements MetricsReader { private MetricValue readHeapSize() { Map<String, Metric> metrics = memoryMetricSet.getMetrics(); MetricValue value = null; if (metrics.containsKey(MEMORY_HEAP_SIZE_KEY)) { value = MetricValue.bytes( ((Long) ((Gauge) metrics.get(MEMORY_HEAP_SIZE_KEY)).getValue()).intValue()); } return value; } DefaultMetricsReader(); @Override List<MetricName> readableNames(); @Override MetricValue readValue(MetricName name);  }### Answer:
@Test public void testReadHeapSize() { System.out.println("testReadHeapSize"); DefaultMetricsReader reader = new DefaultMetricsReader(); MetricValue value = reader.readValue(MetricName.HEAP_SIZE); assertThat(value, notNullValue()); assertThat(value.getUnit(), equalTo(MetricUnit.BYTES)); assertThat(value.getValue(), greaterThanOrEqualTo(0.0)); }