### Question:
SimonManagerMXBeanImpl implements SimonManagerMXBean { @Override public final CounterSample getCounterSample(String name) { Counter counter = getSimonOfType(name, Counter.class); return sampleCounter(counter); } 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(expectedExceptions = SimonException.class, expectedExceptionsMessageRegExp = "Unknown Simon.*") public void getCounterSampleForNonExistingSimon() { managerMXBean.getCounterSample("non.existing"); }
@Test(expectedExceptions = SimonException.class, expectedExceptionsMessageRegExp = "Wrong Simon type") public void getCounterSampleForWrongType() { managerMXBean.getCounterSample("base.stopwatch.aaa"); }