public void testEPtoJavaSessionScopeInvoke() throws Throwable {
RuntimeContext runtime = MockFactory.registerFooBinding(MockFactory.createJavaRuntime());
PolicyBuilderRegistry registry = (PolicyBuilderRegistry) ((CompositeContext) runtime.getSystemContext().getContext(MockFactory.SYSTEM_CHILD))
.getContext(MockFactory.POLICY_BUILDER_REGISTRY).getInstance(null);
MockSyncInterceptor mockInterceptor = new MockSyncInterceptor();
MockInterceptorBuilder interceptorBuilder = new MockInterceptorBuilder(mockInterceptor, false);
registry.registerTargetBuilder(interceptorBuilder);
runtime.getRootContext().registerModelObject(MockFactory.createCompositeComponent("test.module"));
CompositeContext child = (CompositeContext) runtime.getRootContext().getContext("test.module");
child.registerModelObject(MockFactory.createModuleWithEntryPoint(Scope.SESSION));
child.publish(new ModuleStart(this));