final MBeanServer mbeanServer = Registry.getRegistry(null, null).getMBeanServer();
// Verify there are no Catalina or Tomcat MBeans
Set<ObjectName> onames = mbeanServer.queryNames(new ObjectName("Catalina:*"), null);
log.info(MBeanDumper.dumpBeans(mbeanServer, onames));
assertEquals("Unexpected: " + onames, 0, onames.size());
onames = mbeanServer.queryNames(new ObjectName("Tomcat:*"), null);
log.info(MBeanDumper.dumpBeans(mbeanServer, onames));
assertEquals("Unexpected: " + onames, 0, onames.size());
final Tomcat tomcat = getTomcatInstance();
final File contextDir = new File(getTemporaryDirectory(), "webappFoo");