Instance b = composite_b.getMainInst();
S3GroupAImpl ga = (S3GroupAImpl) a.getServiceObject();
S3GroupBImpl gb = (S3GroupBImpl) b.getServiceObject();
System.out.println("Element B injected: " + gb.getElement());
auxListInstances("bbbbbbbbbbbbbbbbbbbbbbbb");
System.out.println("Element A injected: " + ga.getElement());
auxListInstances("aaaaaaaaaaaaaaaaaaaaaaaa");
String messageTemplate = "Composite that do not allow anything to be imported (<import implementation='false' />) should never import other composite instance. %s";
String message = String
.format(messageTemplate,
"Although, an instance from composite B was injected in composite A even if A is marked with <import implementation='false' />");
// The fact the implem is not visible does not mean we cannot resolve :
// it can be deployed again,
// and it is possible to see its instances anyway !.
Assert.assertTrue(message, ga.getElement() == gb.getElement());
}