### Question:
IntervalCounter implements Counter { @Override public Iterable<Measurement> measure() { return Collections.emptyList(); } IntervalCounter(Registry registry, Id id); static IntervalCounter get(Registry registry, Id id); @Override void add(double amount); @Override double actualCount(); @Override Id id(); double secondsSinceLastUpdate(); @Override Iterable<Measurement> measure(); @Override boolean hasExpired();  }### Answer:
@Test public void testMeasure() { Registry r = new DefaultRegistry(clock); clock.setWallTime(61000L); Id id = r.createId("test"); Counter c = IntervalCounter.get(r, id); r.stream().forEach(meter -> { for (Measurement m : meter.measure()) { Assertions.assertEquals(m.timestamp(), 61000L); } }); final List<Measurement> measurements = getAllMeasurements(r); final double initAge = Utils.first(measurements, Statistic.duration).value(); final double initCount = Utils.first(measurements, Statistic.count).value(); Assertions.assertEquals(61.0, initAge, EPSILON); Assertions.assertEquals(0.0, initCount, EPSILON); clock.setWallTime(120000L); c.increment(); final List<Measurement> afterMeasurements = getAllMeasurements(r); final double afterAge = Utils.first(afterMeasurements, Statistic.duration).value(); final double afterCount = Utils.first(afterMeasurements, Statistic.count).value(); Assertions.assertEquals(0.0, afterAge, EPSILON); Assertions.assertEquals(1.0, afterCount, EPSILON); }