PrimitiveComponentType cons = createAConsumer();
CompositeComponentType type = new CompositeComponentType()
.setBundleContext(context)
.setComponentTypeName("comp1")
.addInstance(new Instance(prov.getFactory().getName()))
.addInstance(new Instance(cons.getFactory().getName()));
ComponentInstance ci = type.createInstance();
assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));