*/
public class NonBlockingInterceptorTestCase extends TestCase {
public void testInvoke() throws Exception {
WorkScheduler scheduler = createMock(WorkScheduler.class);
scheduler.scheduleWork(isA(Runnable.class));
expectLastCall().andStubAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
Runnable runnable = (Runnable) getCurrentArguments()[0];
runnable.run();
return null;