ThreadSleeper added and test methods for communicating between services and activities