server = injector.getInstance(TestingHttpServer.class);
testMBean = injector.getInstance(TestMBean.class);
testMBeanName = new ObjectName(generatedNameOf(TestMBean.class));
MBeanExporter exporter = new MBeanExporter(platformMBeanServer);
exporter.export(testMBeanName.toString(), testMBean);
JMXConnector connect = JMXConnectorFactory.connect(
new JMXServiceURL("service:jmx:" + server.getBaseUrl()),
ImmutableMap.of(JMXConnector.CREDENTIALS, new String[] {"foo", "bar"}));
mbeanServerConnection = connect.getMBeanServerConnection();