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