RequestCounter implements ServiceWrapper { public synchronized long[] sample() { return new long[]{numRequests, numSuccesses, numFailures}; } RequestCounter(); T invoke(Callable<T> c); void invoke(Runnable r); T invoke(Runnable r, T result); synchronized long[] sample();  }
@Test public void testCountersInitiallyZero() { assertArrayEquals(new long[] {0L, 0L, 0L}, impl.sample()); }