public class CalculatorTestCase {
@Test
public void testCalculator() throws Exception {
Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "./target/classes"));
node.start();
CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
assertEquals(calculator.add(3, 2), 5.0, 0);
assertEquals(calculator.subtract(3, 2), 1.0, 0);
assertEquals(calculator.multiply(3, 2), 6.0, 0);
assertEquals(calculator.divide(3, 2), 1.5, 0);
node.stop();
}