Object service = context.getService(ref);
Assert.assertNotNull(service);
CalculatorService calculator = OSGiTestBundles.cast(service, CalculatorService.class);
System.out.println("2.0 + 1.0 = " + calculator.add(2.0, 1.0));
System.out.println("2.0 - 1.0 = " + calculator.subtract(2.0, 1.0));
System.out.println("2.0 * 1.0 = " + calculator.multiply(2.0, 1.0));
System.out.println("2.0 / 1.0 = " + calculator.divide(2.0, 1.0));
}
}
/**