public void CompositeContentMngtDisputeAmongInjectionAndOwnInstanceIntoComposite_tc048() {
Implementation sharedDependencyImpl = waitForImplByName(null,
"BoschSwitch");
CompositeType compositeAImpl = (CompositeType) waitForImplByName(null,
"composite-a");
Composite compositeA = (Composite) compositeAImpl.createInstance(null,
null);
apam.waitForIt(Constants.CONST_WAIT_TIME);
// Instance sharedDependency=sharedDependencyImpl.createInstance(null,
// null); //works
Instance sharedDependency = sharedDependencyImpl.createInstance(
compositeA, null); // do not works
apam.waitForIt(Constants.CONST_WAIT_TIME);
S3GroupAImpl s3b = (S3GroupAImpl) compositeA.getMainInst()
.getServiceObject();
s3b.getElement();
System.out.println("Original composite:"
+ sharedDependency.getComposite());
apam.waitForIt(Constants.CONST_WAIT_TIME);
CompositeType compositeBImpl = (CompositeType) waitForImplByName(null,
"composite-a-dispute-inject-own");
Composite compositeB = (Composite) compositeBImpl.createInstance(null,
null);
apam.waitForIt(Constants.CONST_WAIT_TIME);
System.out.println("Composite after the own composite instantiation:"