### Question:
CompositeDistributionSummary extends CompositeMeter<DistributionSummary> implements DistributionSummary { @Override public void record(long amount) { for (DistributionSummary d : meters) { d.record(amount); } } CompositeDistributionSummary(Id id, Collection<DistributionSummary> summaries); @Override void record(long amount); @Override long count(); @Override long totalAmount();  }### Answer:
@Test public void empty() { DistributionSummary t = new CompositeDistributionSummary( NoopId.INSTANCE, Collections.emptyList()); assertCountEquals(t, 0L); assertTotalEquals(t, 0L); t.record(1L); assertCountEquals(t, 0L); assertTotalEquals(t, 0L); }
@Test public void testRecord() { DistributionSummary t = newDistributionSummary(); t.record(42); assertCountEquals(t, 1L); assertTotalEquals(t, 42L); }
@Test public void testMeasure() { DistributionSummary t = newDistributionSummary(); t.record(42); clock.setWallTime(3712345L); for (Measurement m : t.measure()) { Assertions.assertEquals(m.timestamp(), 3712345L); if (m.id().equals(t.id().withTag(Statistic.count))) { Assertions.assertEquals(m.value(), 1.0, 0.1e-12); } else if (m.id().equals(t.id().withTag(Statistic.totalAmount))) { Assertions.assertEquals(m.value(), 42, 0.1e-12); } else { Assertions.fail("unexpected id: " + m.id()); } } }