The test logic is added into sample-contribution-binding-sca-calculator's
CalculatorTestCase, so it is using the same contribution definition of that
sample.
Looking at the directory where the location is used to
loadContribution, Isee sca-contribution.xml under META-INF and
composite file under root.
I used the same location to bootstrap the contribution using Node interface,
which it works.
Contribution[] contributions = *new* Contribution[1];
location = ContributionLocationHelper.*getContributionLocation*(
"Calculator.composite");
contributions[0] = *new* Contribution("CalculatorTestCase", location);
node = *factory*.createNode("Calculator.composite",contributions);
node.start();
SCAClientFactory scaClientFactory = SCAClientFactory.*newInstance*(URI.*
create*("default"));
calculatorService = scaClientFactory.getService(CalculatorService.*class*,
"CalculatorServiceComponent");
System.*out*.println("3 - 2 = " + calculatorService.subtract(3, 2));
Yang.