Map<String, Class<? extends PersistenceManagerFactory>> factories = new HashMap<String, Class<? extends PersistenceManagerFactory>>();
factories.put("MyStatefulSessionFilePersistenceManager", MyStatefulSessionFilePersistenceManagerFactory.class);
PersistenceManagerFactoryRegistry persistenceManagerFactoryRegistry = new PersistenceManagerFactoryRegistry();
persistenceManagerFactoryRegistry.setFactories(factories);
Ejb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
deployment.setPersistenceManagerFactoryRegistry(persistenceManagerFactoryRegistry);
MockStatefulContainer container = new MockStatefulContainer(cl, beanClassName, ejbName, domain, ctxProperties,
deployment);
container.instantiated();
container.processMetadata();
System.out.println("injectors = " + container.getInjectors());