BasicCounter extends AbstractMonitor<Number> implements Counter, SpectatorMonitor { @Override public void increment() { spectatorCounter.increment(); count.incrementAndGet(); } BasicCounter(MonitorConfig config); @Override void increment(); @Override void increment(long amount); @Override Number getValue(int pollerIdx); @Override void initializeSpectator(TagList tags); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testEqualsCount() throws Exception { BasicCounter c1 = newInstance("foo"); BasicCounter c2 = newInstance("foo"); assertEquals(c1, c2); c1.increment(); assertNotEquals(c1, c2); c2.increment(); assertEquals(c1, c2); }