* Registers the {@link FooBinding} builders with a given runtime
*
* @throws ConfigurationException
*/
public static RuntimeContext registerFooBinding(RuntimeContext runtime) throws ConfigurationException {
CompositeContext child = (CompositeContext) runtime.getSystemContext().getContext(MockFactory.SYSTEM_CHILD);
child.getContext(MockFactory.JAVA_BUILDER).getInstance(null);
Component comp = systemFactory.createSystemComponent(FOO_BUILDER, ContextFactoryBuilder.class, FooBindingBuilder.class, Scope.MODULE);
comp.getImplementation().setComponentType(getIntrospector().introspect(FooBindingBuilder.class));
child.registerModelObject(comp);
comp = systemFactory.createSystemComponent(FOO_WIRE_BUILDER, WireBuilder.class, FooBindingWireBuilder.class, Scope.MODULE);
comp.getImplementation().setComponentType(getIntrospector().introspect(FooBindingWireBuilder.class));
child.registerModelObject(comp);
// since the child context is already started, we need to manually retrieve the components to init them
Assert.assertNotNull(child.getContext(FOO_BUILDER).getInstance(null));
Assert.assertNotNull(child.getContext(FOO_WIRE_BUILDER).getInstance(null));
return runtime;
}