Refactored IntentService unit tests and fixed SQLiteDatabase connection leak