@BeforeMethod
public void setup()
throws Exception
{
Bootstrap app = new Bootstrap(
new TestingNodeModule(),
new TestingHttpServerModule(),
new JsonModule(),
new JmxHttpRpcModule(TheServlet.class),
new Module()
{
@Override
public void configure(Binder binder)
{
binder.bind(MBeanServer.class).toInstance(platformMBeanServer);
binder.bind(TestMBean.class).in(Scopes.SINGLETON);
}
});
Injector injector = app
.strictConfig()
.doNotInitializeLogging()
.initialize();
lifeCycleManager = injector.getInstance(LifeCycleManager.class);