schedulerWatcher = createCapture();
expect(schedulers.watch(capture(schedulerWatcher))).andReturn(createMock(Command.class));
control.replay();
final ShutdownRegistryImpl shutdownRegistry = injector.getInstance(ShutdownRegistryImpl.class);
addTearDown(new TearDown() {
@Override
public void tearDown() {
shutdownRegistry.execute();
}
});
injector.getInstance(StartupRegistry.class).execute();
LocalServiceRegistry serviceRegistry = injector.getInstance(LocalServiceRegistry.class);
httpServer = serviceRegistry.getAuxiliarySockets().get("http");