MeterView implements Meter, View { @Override public void markEvent() { this.counter.inc(); } MeterView(int timeSpanInSeconds);  MeterView(Counter counter, int timeSpanInSeconds); @Override void markEvent(); @Override void markEvent(long n); @Override long getCount(); @Override double getRate(); @Override void update();  }
@Test public void testMarkEvent() { Counter c = new SimpleCounter(); Meter m = new MeterView(c, 60); assertEquals(0, m.getCount()); m.markEvent(); assertEquals(1, m.getCount()); m.markEvent(2); assertEquals(3, m.getCount()); }