super.setUp(); getContext().bindService(new Intent(mContext, MessengerService.class), mConnection, Context.BIND_AUTO_CREATE); synchronized (this) { while (mServiceMessenger == null) { try { wait(); } catch (InterruptedException e) { } } }
super.tearDown(); getContext().unbindService(mConnection);
(new TestThread()).doTest(1000);