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.createModuleWithExternalService());
child.publish(new ModuleStart(this));
HelloWorldService source = (HelloWorldService) child.getContext("source").getInstance(null);
Assert.assertNotNull(source);
Assert.assertEquals(0, mockInterceptor.getCount());
Assert.assertEquals("foo", source.hello("foo"));
Assert.assertEquals(1, mockInterceptor.getCount());