### Question:
SimonManagerMXBeanImpl implements SimonManagerMXBean { @Override public final void inheritState(String name) { setSimonState(name, SimonState.INHERIT); } SimonManagerMXBeanImpl(Manager manager); @Override final void enable(); @Override final void disable(); @Override final boolean isEnabled(); @Override final String[] getSimonNames(); @Override final String[] getSimonNamesOrdered(); @Override final String getType(String name); @Override final SimonInfo[] getSimonInfos(); @Override final void clearManager(); @Override final void enableSimon(String name); @Override final void disableSimon(String name); @Override final void inheritState(String name); @Override final CounterSample getCounterSample(String name); @Override CounterSample getIncrementCounterSample(String name, String key); @Override List<CounterSample> getCounterSamples(String namePattern); @Override List<CounterSample> getIncrementCounterSamples(String namePattern, String key); @Override List<CounterSample> getCounterSamples(); @Override List<CounterSample> getIncrementCounterSamples(String key); @Override final StopwatchSample getStopwatchSample(String name); @Override StopwatchSample getIncrementStopwatchSample(String name, String key); @Override List<StopwatchSample> getStopwatchSamples(String namePattern); @Override List<StopwatchSample> getIncrementStopwatchSamples(String namePattern, String key); @Override List<StopwatchSample> getStopwatchSamples(); @Override List<StopwatchSample> getIncrementStopwatchSamples(String key); @Override final void printSimonTree();  }### Answer:
@Test public void testInheritState() { managerMXBean.inheritState("base.counter.aaa"); verify(counterA).setState(SimonState.INHERIT, false); }
@Test(expectedExceptions = SimonException.class, expectedExceptionsMessageRegExp = "Unknown Simon.*") public void testSetInheritStateForNonExistingSimon() { managerMXBean.inheritState("non.existing"); }