### Question:
CounterMXBeanImpl extends AbstractSimonMXBeanImpl implements CounterMXBean { @Override public boolean stopIncrementalSampling(String key) { return counter.stopIncrementalSampling(key); } CounterMXBeanImpl(Counter counter); @Override final void increase(); @Override final void decrease(); @Override final void increase(long inc); @Override final void decrease(long dec); @Override long getMaxTimestamp(); @Override long getMax(); @Override long getMinTimestamp(); @Override long getMin(); @Override long getCounter(); @Override final void set(long val); @Override long getIncrementSum(); @Override long getDecrementSum(); @Override final CounterSample sample(); @Override CounterSample sampleIncrement(String key); @Override final String getType(); @Override boolean stopIncrementalSampling(String key);  }### Answer:
@Test public void testStopIncrementSampling() { String key = "key"; when(counter.stopIncrementalSampling(key)).thenReturn(true); boolean actual = counterMXBean.stopIncrementalSampling(key); Assert.assertTrue(actual); verify(counter).stopIncrementalSampling(key); }