void callback();
}
protected void setUp() throws Exception {
super.setUp();
wireService = new JDKWireService();
container = new ModuleScopeContainer();
container.start();
context = createMock(DeploymentContext.class);
context.getModuleScope();
expectLastCall().andReturn(container).anyTimes();
replay(context);
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;
}
});
replay(scheduler);
builder = new JavaComponentBuilder();
workContext = new WorkContextImpl();
builder.setWorkContext(workContext);
builder.setWireService(new JDKWireService(workContext, null));
builder.setWorkScheduler(scheduler);
}