Map globalBindings = new HashMap(javaCompOnlyBindings);
globalBindings.put("test/env/foo", new Integer(42));
globalBindings.put("test/baz", "caz");
Map javaCompBindings = getNestedBindings(globalBindings, "java:comp/");
ImmutableContext javaCompContext = new ImmutableContext(javaCompBindings);
RootContext.setComponentContext(javaCompContext);
GBeanData javaComp = configurationData.addGBean("JavaComp", JavaCompContextGBean.GBEAN_INFO);
AbstractName javaCompName = javaComp.getAbstractName();