ClassLoader cl = Thread.currentThread().getContextClassLoader();
Class<?> beanClass = MockBean.class;
String beanClassName = beanClass.getName();
String ejbName = beanClass.getSimpleName();
Domain domain = new Domain(new AspectManager(), "Test", false);
GenericAspectFactory aspectFactory = new GenericAspectFactory(CurrentInvocationInterceptor.class.getName(), null);
AspectDefinition def = new AspectDefinition("CurrentInvocationInterceptor", Scope.PER_VM, aspectFactory);
domain.addAspectDefinition(def);
AdviceFactory factory = new AdviceFactory(def, "invoke");