NetworkedCounter implements Counter { public void incrementBy(int value) { count += value; } NetworkedCounter(String counterName, String stageName, String instance, String url); void increment(); void incrementBy(int value); void flush(); void connectUrl(String url);  }
@Test public void testIncrementBy() { MockCounter counter = new MockCounter("a", "b", "c", "d"); assertEquals(0, counter.count); counter.incrementBy(5); assertEquals(5, counter.count); counter.incrementBy(15); assertEquals(20, counter.count); }