* - get a local service proxy
* - make a service call using the proxy
* - stop the node
*/
public static void main(String[] args) throws Exception {
Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "../calculator-contribution.jar"));
node.start();
CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
double result = calculator.add(3, 2);
System.out.println("3 + 2 = " + result);
if (result != 5.0){
throw new RuntimeException("Expected 5.0 but result was " + result);
}
node.stop();
}