public void testBindUnbind() throws Exception {
System.setProperty("java.naming.factory.initial", "org.apache.xbean.naming.global.GlobalContextManager");
GlobalContextGBean globalContext = new GlobalContextGBean(null);
GlobalContextManager.setGlobalContext(globalContext);
DeepBindableContext context = new DeepBindableContext("openejb", false, true, false, false);
globalContext.bind("openejb", context);
Context contextWrapper = context.newJndiFactory().createRootContext();
testBindUnbind(context, contextWrapper, "openejb/foo/bar", "");
testBindUnbind(context, contextWrapper, "java:openejb/foo/bar", "java:");