public void testEvery40thSecond() throws Exception {
try {
// just fire up the bean and give it enough time to time itself and record any anomolies.
Thread.sleep(LONG_SLEEP_TIME);
} catch (InterruptedException ex) {
throw new InternalException("Should not have been woken up here");
}
Assert.assertTrue(everyTestBean.isWas40SecondEventObserved());
Assert.assertTrue(everyTestBean.isWasMinuteEventObserved());
if (everyTestBean.getErrorDetected() != null) {
throw everyTestBean.getErrorDetected();