final Runnable withinGetAttribute =
(when == When.IN_GET_ATTRIBUTE) ? sensitiveThing : nothing;
mbs.registerMBean(new Test(withinGetAttribute), observedName);
monitorProxy.addObservedObject(observedName);
monitorProxy.setObservedAttribute("Thing");
monitorProxy.setThresholds(105, 100);
monitorProxy.setGranularityPeriod(10L); // 10 ms
monitorProxy.setNotifyHigh(true);
monitorProxy.setNotifyLow(true);