composite.setName(new QName("testComposite"));
// create a component
Component component = assemblyFactory.createComponent();
component.setName("testComponent");
JavaImplementationFactory javaImplementationFactory = modelFactories.getFactory(JavaImplementationFactory.class);
JavaImplementation javaImplementation = javaImplementationFactory.createJavaImplementation(contribution.getClassLoader().loadClass("sample.HelloworldImpl"));
javaImplementation.setJavaClass(contribution.getClassLoader().loadClass("sample.HelloworldImpl"));
component.setImplementation(javaImplementation);
// add the component to the composite
composite.getComponents().add(component);