public void testInit()
 {
     CountdownLatch latch = new CountdownLatch(1);
     InitListener listener = new InitListener(latch);
     Platform.init(listener);
     latch.Wait();
     Assert.AreEqual(listener.initState, InitStateChangedEvent.InitState.INITIALIZED);
     tearDown();
 }
 public void testGetService()
 {
     CountdownLatch latch = new CountdownLatch(1);
     InitListener listener = new InitListener(latch);
     Assert.IsNull(Platform.getService());
     Platform.init(listener);
     latch.Wait();
     Assert.IsNotNull(Platform.getService());
     tearDown();
 }
 protected void setUp()
 {
     CountdownLatch latch = new CountdownLatch(1);
     InitListener listener = new InitListener(latch);
     Platform.init(listener);
     latch.Wait();
     Assert.AreEqual(InitStateChangedEvent.InitState.INITIALIZED, listener.initState, "Failed to initialize the platform due to: " + listener.errMsg);
     _service = Platform.getService();
     dispatcher = new CloudeoServiceEventDispatcher();
     _service.addServiceListener(createVoidResponder(), dispatcher);
     awaitVoidResult("addServiceListener");
 }