Bug 1451565 - Update Robolectric to 3.8. r=mcomella
authorNick Alexander <nalexander@mozilla.com>
Wed, 04 Apr 2018 16:48:03 -0700
changeset 780996 633defe3cba479e3b482aa06589f5949d237b21e
parent 780995 785c5c3cf010fe02f235a3084834154097508275
child 780997 131a63a3ce79c18cd730b5e2d2c8702c108b96fa
push id106187
push userbmo:sledru@mozilla.com
push dateThu, 12 Apr 2018 11:43:14 +0000
reviewersmcomella
bugs1451565
milestone61.0a1
Bug 1451565 - Update Robolectric to 3.8. r=mcomella MozReview-Commit-ID: 9lQ7De6cifZ
mobile/android/app/build.gradle
mobile/android/app/src/test/java/com/keepsafe/switchboard/TestSwitchboard.java
mobile/android/app/src/test/java/org/mozilla/gecko/GeckoNetworkManagerTest.java
mobile/android/app/src/test/java/org/mozilla/gecko/GlobalPageMetadataTest.java
mobile/android/app/src/test/java/org/mozilla/gecko/TestGeckoProfile.java
mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/homepanel/TestActivityStreamConfiguration.java
mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/homepanel/model/TestHighlight.java
mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/homepanel/topstories/TestPocketStoriesLoader.java
mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/ranking/TestHighlightsRanking.java
mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/ranking/TestRankingUtils.java
mobile/android/app/src/test/java/org/mozilla/gecko/cleanup/TestFileCleanupController.java
mobile/android/app/src/test/java/org/mozilla/gecko/cleanup/TestFileCleanupService.java
mobile/android/app/src/test/java/org/mozilla/gecko/customtabs/TestCustomTabsActivity.java
mobile/android/app/src/test/java/org/mozilla/gecko/customtabs/TestIntentUtil.java
mobile/android/app/src/test/java/org/mozilla/gecko/distribution/TestReferrerDescriptor.java
mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestDownloadAction.java
mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestStudyAction.java
mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestSyncAction.java
mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestVerifyAction.java
mobile/android/app/src/test/java/org/mozilla/gecko/dlc/catalog/TestDownloadContentBuilder.java
mobile/android/app/src/test/java/org/mozilla/gecko/dlc/catalog/TestDownloadContentCatalog.java
mobile/android/app/src/test/java/org/mozilla/gecko/home/TestHomeConfigPrefsBackendMigration.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconDescriptor.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconDescriptorComparator.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconRequest.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconRequestBuilder.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconResponse.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconTask.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconsHelper.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestContentProviderLoader.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestDataUriLoader.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestDiskLoader.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestIconDownloader.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestIconGenerator.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestJarLoader.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestLegacyLoader.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestMemoryLoader.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestSuggestedSiteLoader.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestAboutPagesPreparer.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestAddDefaultIconUrl.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestFilterKnownFailureUrls.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestFilterMimeTypes.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestFilterPrivilegedUrls.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestSuggestedSitePreparer.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestColorProcessor.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestDiskProcessor.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestMemoryProcessor.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestMinimumSizeProcessor.java
mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestResizingProcessor.java
mobile/android/app/src/test/java/org/mozilla/gecko/media/TestMediaControlService.java
mobile/android/app/src/test/java/org/mozilla/gecko/push/TestPushManager.java
mobile/android/app/src/test/java/org/mozilla/gecko/push/TestPushState.java
mobile/android/app/src/test/java/org/mozilla/gecko/push/autopush/test/TestAutopushClient.java
mobile/android/app/src/test/java/org/mozilla/gecko/push/autopush/test/TestLiveAutopushClient.java
mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/measurements/TestSearchCountMeasurements.java
mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/measurements/TestSessionMeasurements.java
mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncEventPingBuilderTest.java
mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncPingBuilderTest.java
mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncPingBundleBuilderTest.java
mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TestTelemetryPingBuilder.java
mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/schedulers/TestTelemetryUploadAllPingsImmediatelyScheduler.java
mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/stores/TestTelemetryJSONFilePingStore.java
mobile/android/app/src/test/java/org/mozilla/gecko/toolbar/TestSecurityModeUtil.java
mobile/android/app/src/test/java/org/mozilla/gecko/util/TestURIUtils.java
mobile/android/app/src/test/java/org/mozilla/gecko/util/publicsuffix/TestPublicSuffix.java
mobile/android/geckoview/build.gradle
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestBackoff.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestBrowserIDAuthHeaderProvider.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestClientsEngineStage.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestCredentialsEndToEnd.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestGlobalSession.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestHeaderParsing.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestLineByLineHandling.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestMetaGlobal.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestResource.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestRetryAfter.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestServer15Repository.java
mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestSyncStorageRequest.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestCollectionKeys.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestCommandProcessor.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestCryptoRecord.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestRecord.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestRecordsChannel.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestResetCommands.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestServer15RepositorySession.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestSynchronizer.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestSynchronizerSession.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestUtils.java
mobile/android/services/src/test/java/org/mozilla/android/sync/test/helpers/test/TestHTTPServerTestHelper.java
mobile/android/services/src/test/java/org/mozilla/gecko/background/common/log/writers/test/TestLogWriters.java
mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestClientsDatabase.java
mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestClientsDatabaseAccessor.java
mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestTabsProvider.java
mobile/android/services/src/test/java/org/mozilla/gecko/background/fxa/test/TestFxAccountClient20.java
mobile/android/services/src/test/java/org/mozilla/gecko/background/fxa/test/TestFxAccountUtils.java
mobile/android/services/src/test/java/org/mozilla/gecko/background/testhelpers/TestRunner.java
mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestASNUtils.java
mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestDSACryptoImplementation.java
mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestJSONWebTokenUtils.java
mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestRSACryptoImplementation.java
mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserContractTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserDatabaseHelperTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderBookmarksTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderGeneralTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderHistoryTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderHistoryVisitsTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderVisitsTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/db/LocalBrowserDBTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/fxa/TestSkewHandler.java
mobile/android/services/src/test/java/org/mozilla/gecko/fxa/authenticator/AndroidFxAccountTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceListUpdater.java
mobile/android/services/src/test/java/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceRegistrator.java
mobile/android/services/src/test/java/org/mozilla/gecko/fxa/login/TestFxAccountLoginStateMachine.java
mobile/android/services/src/test/java/org/mozilla/gecko/fxa/login/TestStateFactory.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestBase32.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestCryptoInfo.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestHKDF.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestKeyBundle.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestPBKDF2.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestPersistedCrypto5Keys.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestSRPConstants.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/middleware/test/TestCrypto5MiddlewareRepositorySession.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/net/test/TestHMACAuthHeaderProvider.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/net/test/TestHawkAuthHeaderProvider.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/net/test/TestUserAgentHeaders.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/BookmarksSessionHelperTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/BrowserContractHelpersTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/HistorySessionHelperTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/VisitsHelperTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/test/TestBookmarksInsertionManager.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/domain/TestClientRecord.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/domain/test/TestFormHistoryRecord.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/domain/test/TestPasswordRecord.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/downloaders/BatchingDownloaderControllerTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/downloaders/BatchingDownloaderDelegateTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/downloaders/BatchingDownloaderTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/test/TestRepositorySessionBundle.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/BatchMetaTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/BatchingUploaderTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/PayloadTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/PayloadUploadDelegateTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/RecordUploadRunnableTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/UploaderMetaTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/setup/activities/WebURLFinderTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/stage/test/TestEnsureCrypto5KeysStage.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/stage/test/TestFetchMetaGlobalStage.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/stage/test/TestStageLookup.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/synchronizer/StoreBatchTrackerTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/telemetry/TelemetryCollectorTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/telemetry/TelemetryEventCollectorTest.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestBookmarkValidator.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestExtendedJSONObject.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestInfoCollections.java
mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestPersistedMetaGlobal.java
mobile/android/services/src/test/java/org/mozilla/gecko/tokenserver/test/TestTokenServerClient.java
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -246,17 +246,17 @@ dependencies {
     localImplementation 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
     officialImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
     testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
 
     implementation project(path: ':geckoview')
     implementation project(path: ':thirdparty')
 
     testImplementation 'junit:junit:4.12'
-    testImplementation 'org.robolectric:robolectric:3.5.1'
+    testImplementation 'org.robolectric:robolectric:3.8'
     testImplementation 'org.simpleframework:simple-http:6.0.1'
     testImplementation 'org.mockito:mockito-core:1.10.19'
 
     // Including the Robotium JAR directly can cause issues with dexing.
     androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.5.4'
 }
 
 // TODO: (bug 1261486): This impl is not robust -
--- a/mobile/android/app/src/test/java/com/keepsafe/switchboard/TestSwitchboard.java
+++ b/mobile/android/app/src/test/java/com/keepsafe/switchboard/TestSwitchboard.java
@@ -2,39 +2,39 @@ package com.keepsafe.switchboard;
 
 import android.content.Context;
 
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.Experiments;
 import org.mozilla.gecko.switchboard.DeviceUuidFactory;
 import org.mozilla.gecko.switchboard.Preferences;
 import org.mozilla.gecko.switchboard.SwitchBoard;
 import org.mozilla.gecko.util.IOUtils;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.BufferedInputStream;
 import java.io.BufferedReader;
 import java.io.ByteArrayOutputStream;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.net.URL;
 import java.util.List;
 import java.util.UUID;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSwitchboard {
 
     /**
      * Create a JSON response from a JSON file.
      */
     private String readFromFile(String fileName) throws IOException {
         URL url = getClass().getResource("/" + fileName);
         if (url == null) {
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/GeckoNetworkManagerTest.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/GeckoNetworkManagerTest.java
@@ -1,22 +1,22 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.GeckoNetworkManager.ManagerState;
 import org.mozilla.gecko.GeckoNetworkManager.ManagerEvent;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class GeckoNetworkManagerTest {
     /**
      * Tests the transition matrix.
      */
     @Test
     public void testGetNextState() {
         ManagerState testingState;
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/GlobalPageMetadataTest.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/GlobalPageMetadataTest.java
@@ -7,26 +7,26 @@ import android.content.ContentProvider;
 import android.content.ContentProviderClient;
 import android.content.ContentValues;
 import android.database.Cursor;
 import android.os.RemoteException;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.db.DelegatingTestContentProvider;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.db.BrowserContract;
 import org.mozilla.gecko.db.BrowserContract.PageMetadata;
 import org.mozilla.gecko.db.BrowserDB;
 import org.mozilla.gecko.db.LocalBrowserDB;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.shadows.ShadowContentResolver;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class GlobalPageMetadataTest {
     @Test
     public void testQueueing() throws Exception {
         BrowserDB db = new LocalBrowserDB("default");
 
         final ContentProvider provider = DelegatingTestContentProvider.createDelegatingBrowserProvider();
         try {
             ShadowContentResolver cr = new ShadowContentResolver();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/TestGeckoProfile.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/TestGeckoProfile.java
@@ -8,30 +8,30 @@ package org.mozilla.gecko;
 import android.content.Context;
 
 import org.json.JSONObject;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.util.FileUtils;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.File;
 import java.io.IOException;
 import java.util.UUID;
 
 import static org.junit.Assert.*;
 
 /**
  * Unit test methods of the GeckoProfile class.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestGeckoProfile {
     private static final String PROFILE_NAME = "profileName";
 
     private static final String CLIENT_ID_JSON_ATTR = "clientID";
     private static final String PROFILE_CREATION_DATE_JSON_ATTR = "created";
 
     @Rule
     public TemporaryFolder dirContainingProfile = new TemporaryFolder();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/homepanel/TestActivityStreamConfiguration.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/homepanel/TestActivityStreamConfiguration.java
@@ -1,27 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.activitystream.homepanel;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 import java.util.Locale;
 
-import static android.R.attr.tag;
 import static junit.framework.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestActivityStreamConfiguration {
 
     @Test
     public void testIsPocketEnabledByLocaleInnerForWhitelistedLocaleTags() throws Exception {
         for (final String tag : ActivityStreamConfiguration.pocketEnabledLocaleTags) {
             final Locale whitelistedLocale = getLocaleFromLanguageTag(tag);
             assertTrue("Expected Pocket enabled for locale: " + tag,
                     ActivityStreamConfiguration.isPocketEnabledByLocaleInner(whitelistedLocale));
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/homepanel/model/TestHighlight.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/homepanel/model/TestHighlight.java
@@ -1,26 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.activitystream.homepanel.model;
 
 import junit.framework.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import static android.R.id.input;
-
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestHighlight {
 
     @Test
     public void testInitFastImageURL() throws Exception {
         final Map<String, String> jsonToExpected = new HashMap<>();
         jsonToExpected.put(
                 "{\"image_url\":\"https:\\/\\/upload.wikimedia.org\\/wikipedia\\/commons\\/f\\/f1\\/Brauysegen_im_Bett.gif\"}",
                 "https:\\/\\/upload.wikimedia.org\\/wikipedia\\/commons\\/f\\/f1\\/Brauysegen_im_Bett.gif");
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/homepanel/topstories/TestPocketStoriesLoader.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/homepanel/topstories/TestPocketStoriesLoader.java
@@ -6,21 +6,21 @@ package org.mozilla.gecko.activitystream
 
 import junit.framework.Assert;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.activitystream.homepanel.model.TopStory;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.List;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestPocketStoriesLoader {
     private static final String KEY_STATUS = "status";
     private static final String KEY_LIST = "list";
 
     private static final String KEY_URL = "url";
     private static final String KEY_DEDUPE_URL = "dedupe_url";
     private static final String KEY_TITLE = "title";
     private static final String KEY_IMAGE_SRC = "image_src";
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/ranking/TestHighlightsRanking.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/ranking/TestHighlightsRanking.java
@@ -2,26 +2,26 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.activitystream.ranking;
 
 import android.net.Uri;
 import junit.framework.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestHighlightsRanking {
     @Test
     public void testNormalization() {
         final HighlightCandidate candidate1 = createCandidateWithNormalizationFeatures(30d, 0d, 100d);
         final HighlightCandidate candidate2 = createCandidateWithNormalizationFeatures(50d, 10d, 0d);
         final HighlightCandidate candidate3 = createCandidateWithNormalizationFeatures(15d, 75d, 10000d);
         final HighlightCandidate candidate4 = createCandidateWithNormalizationFeatures(75d, 100d, 250d);
         final HighlightCandidate candidate5 = createCandidateWithNormalizationFeatures(115d, 20d, 2000d);
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/ranking/TestRankingUtils.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/activitystream/ranking/TestRankingUtils.java
@@ -4,28 +4,28 @@
 package org.mozilla.gecko.activitystream.ranking;
 
 import android.database.Cursor;
 import android.database.MatrixCursor;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
 import static org.mozilla.gecko.activitystream.ranking.RankingUtils.Action1;
 import static org.mozilla.gecko.activitystream.ranking.RankingUtils.Action2;
 import static org.mozilla.gecko.activitystream.ranking.RankingUtils.Func1;
 import static org.mozilla.gecko.activitystream.ranking.RankingUtils.Func2;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestRankingUtils {
     @Test
     public void testFilter() {
         final List<Integer> numbers = new ArrayList<>(Arrays.asList(5, 7, 3, 2, 1, 9, 0, 10, 4));
 
         final Func1<Integer, Boolean> func = new Func1<Integer, Boolean>() {
             @Override
             public Boolean call(Integer integer) {
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/cleanup/TestFileCleanupController.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/cleanup/TestFileCleanupController.java
@@ -6,33 +6,33 @@
 
 package org.mozilla.gecko.cleanup;
 
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.ArrayList;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.atMost;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 
 /**
  * Tests functionality of the {@link FileCleanupController}.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFileCleanupController {
 
     @Test
     public void testStartIfReadyEmptySharedPrefsRunsCleanup() {
         final Context context = mock(Context.class);
         FileCleanupController.startIfReady(context, getSharedPreferences(), "");
         verify(context).startService(any(Intent.class));
     }
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/cleanup/TestFileCleanupService.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/cleanup/TestFileCleanupService.java
@@ -6,29 +6,29 @@
 
 package org.mozilla.gecko.cleanup;
 
 import android.content.Intent;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
 import static org.junit.Assert.*;
 
 /**
  * Tests the methods of {@link FileCleanupService}.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFileCleanupService {
     @Rule
     public final TemporaryFolder tempFolder = new TemporaryFolder();
 
     private void assertAllFilesExist(final List<File> fileList) {
         for (final File file : fileList) {
             assertTrue("File exists", file.exists());
         }
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/customtabs/TestCustomTabsActivity.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/customtabs/TestCustomTabsActivity.java
@@ -1,44 +1,35 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.customtabs;
 
-import android.app.PendingIntent;
 import android.content.Context;
 import android.content.Intent;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
 import android.support.annotation.AnimRes;
 import android.support.customtabs.CustomTabsIntent;
-import android.view.Menu;
-import android.view.MenuItem;
 
 import junit.framework.Assert;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.internal.util.reflection.Whitebox;
-import org.mozilla.gecko.R;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
-import org.mozilla.gecko.mozglue.SafeIntent;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
-import org.robolectric.fakes.RoboMenu;
 
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestCustomTabsActivity {
 
     private static final String THIRD_PARTY_PACKAGE_NAME = "mozilla.unit.test";
     private Context spyContext;  // 3rd party app context
     private CustomTabsActivity spyActivity;
 
     @AnimRes
     private final int enterRes = 0x123; // arbitrary number as animation resource id
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/customtabs/TestIntentUtil.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/customtabs/TestIntentUtil.java
@@ -14,27 +14,27 @@ import android.support.annotation.Nullab
 import android.support.customtabs.CustomTabsIntent;
 import android.text.TextUtils;
 
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.R;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.mozglue.SafeIntent;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.List;
 import java.util.Objects;
 
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.spy;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestIntentUtil {
 
     private static final String THIRD_PARTY_PACKAGE_NAME = "mozilla.unit.test";
     private Context spyContext;  // 3rd party app context
 
     @Before
     public void setUp() {
         spyContext = spy(RuntimeEnvironment.application);
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/distribution/TestReferrerDescriptor.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/distribution/TestReferrerDescriptor.java
@@ -2,19 +2,19 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.distribution;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestReferrerDescriptor {
     @Test
     public void testReferrerDescriptor() {
         String referrerString1 = "utm_source%3Dsource%26utm_content%3Dcontent%26utm_campaign%3Dcampaign%26utm_medium%3Dmedium%26utm_term%3Dterm";
         String referrerString2 = "utm_source=source&utm_content=content&utm_campaign=campaign&utm_medium=medium&utm_term=term";
         ReferrerDescriptor referrer1 = new ReferrerDescriptor(referrerString1);
         Assert.assertNotNull(referrer1);
         Assert.assertEquals(referrer1.source, "source");
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestDownloadAction.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestDownloadAction.java
@@ -6,37 +6,37 @@
 package org.mozilla.gecko.dlc;
 
 import android.content.Context;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.AppConstants;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.dlc.catalog.DownloadContent;
 import org.mozilla.gecko.dlc.catalog.DownloadContentBuilder;
 import org.mozilla.gecko.dlc.catalog.DownloadContentCatalog;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.util.Arrays;
 import java.util.Collections;
 
 import static org.mockito.Matchers.*;
 import static org.mockito.Mockito.*;
 
 /**
  * DownloadAction: Download content that has been scheduled during "study" or "verify".
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestDownloadAction {
     private static final String TEST_URL = "http://example.org";
 
     private static final int STATUS_OK = 200;
     private static final int STATUS_PARTIAL_CONTENT = 206;
 
     /**
      * Scenario: The current network is metered.
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestStudyAction.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestStudyAction.java
@@ -4,37 +4,37 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.dlc;
 
 import android.content.Context;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.dlc.catalog.DownloadContent;
 import org.mozilla.gecko.dlc.catalog.DownloadContentBuilder;
 import org.mozilla.gecko.dlc.catalog.DownloadContentCatalog;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 /**
  * StudyAction: Scan the catalog for "new" content available for download.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestStudyAction {
     /**
      * Scenario: Catalog is empty.
      *
      * Verify that:
      *  * No download is scheduled
      *  * Download action is not started
      */
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestSyncAction.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestSyncAction.java
@@ -11,21 +11,21 @@ import android.support.v4.util.AtomicFil
 
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.dlc.catalog.DownloadContent;
 import org.mozilla.gecko.dlc.catalog.DownloadContentBuilder;
 import org.mozilla.gecko.dlc.catalog.DownloadContentCatalog;
 import org.mozilla.gecko.util.IOUtils;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.BufferedInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
@@ -40,17 +40,17 @@ import static org.mockito.Mockito.doRetu
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 
 /**
  * SyncAction: Synchronize catalog from a (mocked) Kinto instance.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSyncAction {
     /**
      * Scenario: The server returns an empty record set.
      */
     @Test
     public void testEmptyResult() throws Exception {
         SyncAction action = spy(new SyncAction());
         doReturn(true).when(action).isSyncEnabledForClient(RuntimeEnvironment.application);
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestVerifyAction.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/TestVerifyAction.java
@@ -4,20 +4,20 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.dlc;
 
 import android.content.Context;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.dlc.catalog.DownloadContent;
 import org.mozilla.gecko.dlc.catalog.DownloadContentBuilder;
 import org.mozilla.gecko.dlc.catalog.DownloadContentCatalog;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.File;
 import java.util.Collections;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Matchers.eq;
@@ -26,17 +26,17 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 /**
  * VerifyAction: Validate downloaded content. Does it still exist and does it have the correct checksum?
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestVerifyAction {
     /**
      * Scenario: Downloaded file does not exist anymore.
      *
      * Verify that:
      *  * Content is re-scheduled for download.
      */
     @Test
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/catalog/TestDownloadContentBuilder.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/catalog/TestDownloadContentBuilder.java
@@ -3,19 +3,19 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 package org.mozilla.gecko.dlc.catalog;
 
 import org.json.JSONException;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestDownloadContentBuilder {
     /**
      * Verify that the values passed to the builder are all set on the DownloadContent object.
      */
     @Test
     public void testBuilder() {
         DownloadContent content = createTestContent();
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/catalog/TestDownloadContentCatalog.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/dlc/catalog/TestDownloadContentCatalog.java
@@ -8,29 +8,29 @@ package org.mozilla.gecko.dlc.catalog;
 import android.support.v4.util.ArrayMap;
 import android.support.v4.util.AtomicFile;
 
 import org.junit.Assert;
 import org.junit.Assume;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.AppConstants;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestDownloadContentCatalog {
     /**
      * Scenario: Create a new, fresh catalog.
      *
      * Verify that:
      *  * Catalog has not changed
      *  * Unchanged catalog will not be saved to disk
      */
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/home/TestHomeConfigPrefsBackendMigration.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/home/TestHomeConfigPrefsBackendMigration.java
@@ -8,28 +8,28 @@ import android.content.Context;
 import android.util.Pair;
 import android.util.SparseArray;
 
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.home.HomeConfig.PanelConfig;
 import org.mozilla.gecko.home.HomeConfig.PanelType;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.Set;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestHomeConfigPrefsBackendMigration {
 
     // Each Pair consists of a list of panels that exist going into a given migration, and a list containing
     // the expected default output panel corresponding to each given input panel in the list of existing panels.
     // E.g. if a given N->N+1 migration starts with panels Foo and Bar, and removes Bar, the two lists would
     // be {Foo, Bar} and {Foo, Foo}.
     // Note: the index where each pair is inserted corresponds to the HomeConfig version before the migration.
     // The final item in this list denotes the current HomeCOnfig version, and therefore only needs to contain
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconDescriptor.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconDescriptor.java
@@ -1,19 +1,19 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.icons;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestIconDescriptor {
     private static final String ICON_URL = "https://www.mozilla.org/favicon.ico";
     private static final String MIME_TYPE = "image/png";
     private static final int ICON_SIZE = 64;
 
     @Test
     public void testGenericIconDescriptor() {
         final IconDescriptor descriptor = IconDescriptor.createGenericIcon(ICON_URL);
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconDescriptorComparator.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconDescriptorComparator.java
@@ -2,21 +2,21 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.icons;
 
 import org.junit.Assert;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.TreeSet;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestIconDescriptorComparator {
     private static final String TEST_ICON_URL_1 = "http://www.mozilla.org/favicon.ico";
     private static final String TEST_ICON_URL_2 = "http://www.example.org/favicon.ico";
     private static final String TEST_ICON_URL_3 = "http://www.example.com/favicon.ico";
 
     private static final String TEST_MIME_TYPE = "image/png";
     private static final int TEST_SIZE = 32;
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconRequest.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconRequest.java
@@ -2,27 +2,26 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.icons;
 
 import junit.framework.Assert;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.TreeSet;
 
-import static org.hamcrest.Matchers.any;
 import static org.mockito.Matchers.anyObject;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestIconRequest {
     private static final String TEST_PAGE_URL = "http://www.mozilla.org";
     private static final String TEST_ICON_URL_1 = "http://www.mozilla.org/favicon.ico";
     private static final String TEST_ICON_URL_2 = "http://www.example.org/favicon.ico";
 
     @Test
     public void testIconHandling() {
         final IconRequest request = Icons.with(RuntimeEnvironment.application)
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconRequestBuilder.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconRequestBuilder.java
@@ -3,25 +3,24 @@
 
 package org.mozilla.gecko.icons;
 
 import org.junit.Assert;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.GeckoAppShell;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
-import java.util.ConcurrentModificationException;
 import java.util.Iterator;
 
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestIconRequestBuilder {
     private static final String TEST_PAGE_URL_1 = "http://www.mozilla.org";
     private static final String TEST_PAGE_URL_2 = "http://www.example.org";
     private static final String TEST_ICON_URL_1 = "http://www.mozilla.org/favicon.ico";
     private static final String TEST_ICON_URL_2 = "http://www.example.org/favicon.ico";
 
     @Test
     public void testPrivileged() {
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconResponse.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconResponse.java
@@ -4,21 +4,21 @@
 package org.mozilla.gecko.icons;
 
 import android.graphics.Bitmap;
 import android.graphics.Color;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.mockito.Mockito.mock;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestIconResponse {
     private static final String ICON_URL = "http://www.mozilla.org/favicon.ico";
 
     @Test
     public void testDefaultResponse() {
         final Bitmap bitmap = mock(Bitmap.class);
 
         final IconResponse response = IconResponse.create(bitmap);
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconTask.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconTask.java
@@ -3,35 +3,35 @@
 
 package org.mozilla.gecko.icons;
 
 import android.graphics.Bitmap;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.loader.IconLoader;
 import org.mozilla.gecko.icons.preparation.Preparer;
 import org.mozilla.gecko.icons.processing.Processor;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestIconTask {
     @Test
     public void testGeneratorIsInvokedIfAllLoadersFail() {
         final List<IconLoader> loaders = Arrays.asList(
                 createFailingLoader(),
                 createFailingLoader(),
                 createFailingLoader());
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconsHelper.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/TestIconsHelper.java
@@ -4,21 +4,21 @@
 package org.mozilla.gecko.icons;
 
 import android.annotation.SuppressLint;
 
 import junit.framework.Assert;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.util.GeckoJarReader;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestIconsHelper {
     @SuppressLint("AuthLeak") // Lint and Android Studio try to prevent developers from writing code
                               // with credentials in the URL (user:password@host). But in this case
                               // we explicitly want to do that, so we suppress the warnings.
     @Test
     public void testGuessDefaultFaviconURL() {
         // Empty values
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestContentProviderLoader.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestContentProviderLoader.java
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.icons.loader;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestContentProviderLoader {
     @Test
     public void testNothingIsLoadedForHttpUrls() {
         final IconRequest request = Icons.with(RuntimeEnvironment.application)
                 .pageUrl("http://www.mozilla.org")
                 .icon(IconDescriptor.createGenericIcon(
                         "https://www.mozilla.org/media/img/favicon/apple-touch-icon-180x180.00050c5b754e.png"))
                 .build();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestDataUriLoader.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestDataUriLoader.java
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.icons.loader;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestDataUriLoader {
     @Test
     public void testNothingIsLoadedForHttpUrls() {
         final IconRequest request = Icons.with(RuntimeEnvironment.application)
                 .pageUrl("http://www.mozilla.org")
                 .icon(IconDescriptor.createGenericIcon(
                         "https://www.mozilla.org/media/img/favicon/apple-touch-icon-180x180.00050c5b754e.png"))
                 .build();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestDiskLoader.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestDiskLoader.java
@@ -3,32 +3,32 @@
 
 package org.mozilla.gecko.icons.loader;
 
 import android.graphics.Bitmap;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
 import org.mozilla.gecko.icons.storage.DiskStorage;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.OutputStream;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestDiskLoader {
     private static final String TEST_PAGE_URL = "http://www.mozilla.org";
     private static final String TEST_ICON_URL = "https://example.org/favicon.ico";
 
     @Test
     public void testLoadingFromEmptyCache() {
         final IconRequest request = Icons.with(RuntimeEnvironment.application)
                 .pageUrl(TEST_PAGE_URL)
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestIconDownloader.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestIconDownloader.java
@@ -3,37 +3,37 @@
 
 package org.mozilla.gecko.icons.loader;
 
 import android.content.Context;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
 import org.mozilla.gecko.icons.storage.FailureCache;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.IOException;
 import java.net.HttpURLConnection;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestIconDownloader {
     /**
      * Scenario: A request with a non HTTP URL (data:image/*) is executed.
      *
      * Verify that:
      *  * No download is performed.
      */
     @Test
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestIconGenerator.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestIconGenerator.java
@@ -5,24 +5,24 @@ package org.mozilla.gecko.icons.loader;
 
 import android.graphics.Bitmap;
 
 import org.junit.Assert;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.R;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestIconGenerator {
     @Test
     public void testNoIconIsGeneratorIfThereAreIconUrlsToLoadFrom() {
         final IconRequest request = Icons.with(RuntimeEnvironment.application)
                 .pageUrl("http://www.mozilla.org")
                 .icon(IconDescriptor.createGenericIcon(
                         "https://www.mozilla.org/media/img/favicon/apple-touch-icon-180x180.00050c5b754e.png"))
                 .icon(IconDescriptor.createGenericIcon(
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestJarLoader.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestJarLoader.java
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.icons.loader;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestJarLoader {
     @Test
     public void testNothingIsLoadedForHttpUrls() {
         final IconRequest request = Icons.with(RuntimeEnvironment.application)
                 .pageUrl("http://www.mozilla.org")
                 .icon(IconDescriptor.createGenericIcon(
                         "https://www.mozilla.org/media/img/favicon/apple-touch-icon-180x180.00050c5b754e.png"))
                 .build();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestLegacyLoader.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestLegacyLoader.java
@@ -5,32 +5,32 @@ package org.mozilla.gecko.icons.loader;
 
 import android.content.ContentProvider;
 import android.graphics.Bitmap;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.db.DelegatingTestContentProvider;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.Iterator;
 
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestLegacyLoader {
     private static final String TEST_PAGE_URL = "http://www.mozilla.org";
     private static final String TEST_ICON_URL = "https://example.org/favicon.ico";
     private static final String TEST_ICON_URL_2 = "https://example.com/page/favicon.ico";
     private static final String TEST_ICON_URL_3 = "https://example.net/icon/favicon.ico";
 
     @Test
     public void testDatabaseIsQueriesForNormalRequestsWithNetworkSkipped() {
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestMemoryLoader.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestMemoryLoader.java
@@ -6,27 +6,27 @@ package org.mozilla.gecko.icons.loader;
 import android.graphics.Bitmap;
 import android.graphics.Color;
 
 import junit.framework.Assert;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
 import org.mozilla.gecko.icons.storage.MemoryStorage;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import static org.mockito.Mockito.mock;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestMemoryLoader {
     private static final String TEST_PAGE_URL = "http://www.mozilla.org";
     private static final String TEST_ICON_URL = "https://example.org/favicon.ico";
 
     @Before
     public void setUp() {
         // Make sure to start with an empty memory cache.
         MemoryStorage.get().evictAll();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestSuggestedSiteLoader.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestSuggestedSiteLoader.java
@@ -11,35 +11,35 @@ import android.graphics.Bitmap;
 import android.graphics.Color;
 import android.os.Build;
 
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.R;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.db.BrowserDB;
 import org.mozilla.gecko.db.SuggestedSites;
 import org.mozilla.gecko.helpers.MockUserManager;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconRequestBuilder;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.IOException;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.spy;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSuggestedSiteLoader {
 
     private Context context;
 
     private static final String[] DEFAULT_SUGGESTED_SITES_ICONS = {
             "https://m.facebook.com/",
             "https://m.youtube.com/",
             "https://www.amazon.com/",
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestAboutPagesPreparer.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestAboutPagesPreparer.java
@@ -1,22 +1,22 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 package org.mozilla.gecko.icons.preparation;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.AboutPages;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestAboutPagesPreparer {
     private static final String[] ABOUT_PAGES = {
             AboutPages.ACCOUNTS,
             AboutPages.ADDONS,
             AboutPages.CONFIG,
             AboutPages.DOWNLOADS,
             AboutPages.FIREFOX,
             AboutPages.HOME
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestAddDefaultIconUrl.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestAddDefaultIconUrl.java
@@ -1,25 +1,25 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.icons.preparation;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.Iterator;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestAddDefaultIconUrl {
     @Test
     public void testAddingDefaultUrl() {
         final IconRequest request = Icons.with(RuntimeEnvironment.application)
                 .pageUrl("http://www.mozilla.org")
                 .icon(IconDescriptor.createTouchicon(
                         "https://www.mozilla.org/media/img/favicon/apple-touch-icon-180x180.00050c5b754e.png",
                         180,
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestFilterKnownFailureUrls.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestFilterKnownFailureUrls.java
@@ -3,24 +3,24 @@
 
 package org.mozilla.gecko.icons.preparation;
 
 import junit.framework.Assert;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.Icons;
 import org.mozilla.gecko.icons.storage.FailureCache;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFilterKnownFailureUrls {
     private static final String TEST_PAGE_URL = "http://www.mozilla.org";
     private static final String TEST_ICON_URL = "https://example.org/favicon.ico";
 
     @Before
     public void setUp() {
         // Make sure we always start with an empty cache.
         FailureCache.get().evictAll();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestFilterMimeTypes.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestFilterMimeTypes.java
@@ -1,23 +1,23 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.icons.preparation;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFilterMimeTypes {
     private static final String TEST_PAGE_URL = "http://www.mozilla.org";
     private static final String TEST_ICON_URL = "https://example.org/favicon.ico";
     private static final String TEST_ICON_URL_2 = "https://mozilla.org/favicon.ico";
 
     @Test
     public void testUrlsWithoutMimeTypesAreNotFiltered() {
         final IconRequest request = Icons.with(RuntimeEnvironment.application)
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestFilterPrivilegedUrls.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestFilterPrivilegedUrls.java
@@ -1,22 +1,22 @@
 package org.mozilla.gecko.icons.preparation;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.Iterator;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFilterPrivilegedUrls {
     private static final String TEST_PAGE_URL = "http://www.mozilla.org";
 
     private static final String TEST_ICON_HTTP_URL = "https://www.mozilla.org/media/img/favicon/apple-touch-icon-180x180.00050c5b754e.png";
     private static final String TEST_ICON_HTTP_URL_2 = "https://www.mozilla.org/media/img/favicon.52506929be4c.ico";
     private static final String TEST_ICON_JAR_URL = "jar:jar:wtf.png";
 
     @Test
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java
@@ -3,24 +3,24 @@
 
 package org.mozilla.gecko.icons.preparation;
 
 import junit.framework.Assert;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.Icons;
 import org.mozilla.gecko.icons.storage.DiskStorage;
 import org.mozilla.gecko.icons.storage.MemoryStorage;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestLookupIconUrl {
     private static final String TEST_PAGE_URL = "http://www.mozilla.org";
 
     private static final String TEST_ICON_URL_1 = "http://www.mozilla.org/favicon.ico";
     private static final String TEST_ICON_URL_2 = "http://example.org/favicon.ico";
     private static final String TEST_ICON_URL_3 = "http://example.com/favicon.ico";
     private static final String TEST_ICON_URL_4 = "http://example.net/favicon.ico";
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestSuggestedSitePreparer.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestSuggestedSitePreparer.java
@@ -6,30 +6,30 @@ package org.mozilla.gecko.icons.preparat
 
 import android.content.Context;
 import android.database.Cursor;
 
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.db.BrowserDB;
 import org.mozilla.gecko.db.SuggestedSites;
 import org.mozilla.gecko.helpers.MockUserManager;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.Icons;
 import org.mozilla.gecko.icons.loader.SuggestedSiteLoader;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.IOException;
 
 import static junit.framework.Assert.assertEquals;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSuggestedSitePreparer {
     private static final String[] DEFAULT_SUGGESTED_SITES_ICONS = {
             "https://m.facebook.com/",
             "https://m.youtube.com/",
             "https://www.amazon.com/",
             "https://www.wikipedia.org/",
             "https://mobile.twitter.com/"
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestColorProcessor.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestColorProcessor.java
@@ -6,26 +6,26 @@ package org.mozilla.gecko.icons.processi
 import android.graphics.Bitmap;
 import android.graphics.Color;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconResponse;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestColorProcessor {
     @Test
     public void testExtractingColor() {
         final IconResponse response = IconResponse.create(createRedBitmapMock());
 
         Assert.assertFalse(response.hasColor());
         Assert.assertEquals(0, response.getColor());
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestDiskProcessor.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestDiskProcessor.java
@@ -5,32 +5,32 @@ package org.mozilla.gecko.icons.processi
 
 import android.graphics.Bitmap;
 import android.graphics.Color;
 
 import junit.framework.Assert;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
 import org.mozilla.gecko.icons.storage.DiskStorage;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.OutputStream;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestDiskProcessor {
     private static final String PAGE_URL = "https://www.mozilla.org";
     private static final String ICON_URL = "https://www.mozilla.org/favicon.ico";
 
     @Test
     public void testNetworkResponseIsStoredInCache() {
         final IconRequest request = createTestRequest();
         final IconResponse response = createTestNetworkResponse();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestMemoryProcessor.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestMemoryProcessor.java
@@ -5,27 +5,27 @@ package org.mozilla.gecko.icons.processi
 
 import android.graphics.Bitmap;
 import android.graphics.Color;
 
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
 import org.mozilla.gecko.icons.storage.MemoryStorage;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import static org.mockito.Mockito.mock;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestMemoryProcessor {
     private static final String PAGE_URL = "https://www.mozilla.org";
     private static final String ICON_URL = "https://www.mozilla.org/favicon.ico";
     private static final String DATA_URL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAEklEQVR4AWP4z8AAxCDiP8N/AB3wBPxcBee7AAAAAElFTkSuQmCC";
 
     @Before
     public void setUp() {
         MemoryStorage.get().evictAll();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestMinimumSizeProcessor.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestMinimumSizeProcessor.java
@@ -2,25 +2,24 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.icons.processing;
 
 import android.graphics.Bitmap;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import static org.mockito.Mockito.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestMinimumSizeProcessor {
 
     private MinimumSizeProcessor processor;
 
     @Before
     public void setUp() {
         processor = new MinimumSizeProcessor();
     }
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestResizingProcessor.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/processing/TestResizingProcessor.java
@@ -2,32 +2,32 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.icons.processing;
 
 import android.graphics.Bitmap;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.icons.IconDescriptor;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.Icons;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyInt;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestResizingProcessor {
     private static final String PAGE_URL = "https://www.mozilla.org";
     private static final String ICON_URL = "https://www.mozilla.org/favicon.ico";
 
     @Test
     public void testBitmapIsNotResizedIfItAlreadyHasTheTargetSize() {
         final IconRequest request = createTestRequest();
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/media/TestMediaControlService.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/media/TestMediaControlService.java
@@ -10,28 +10,28 @@ import junit.framework.Assert;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.internal.util.reflection.Whitebox;
 import org.mozilla.gecko.Tab;
 import org.mozilla.gecko.Tabs;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.media.MediaControlService.State;
 import org.robolectric.Robolectric;
+import org.robolectric.RobolectricTestRunner;
 
 import java.lang.ref.WeakReference;
 
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestMediaControlService {
 
     private MediaControlService mSpyService;
     private AudioFocusAgent mSpyAudioAgent;
     private Context mMockContext;
     private Tab mMockTab;
 
     @Before
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/push/TestPushManager.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/push/TestPushManager.java
@@ -4,34 +4,34 @@
 package org.mozilla.gecko.push;
 
 import org.json.JSONObject;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.AppConstants;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.gcm.GcmTokenClient;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.UUID;
 
 import static org.mockito.Matchers.anyBoolean;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Matchers.isNull;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestPushManager {
     private PushState state;
     private GcmTokenClient gcmTokenClient;
     private PushClient pushClient;
     private PushManager manager;
 
     @Before
     public void setUp() throws Exception {
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/push/TestPushState.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/push/TestPushState.java
@@ -1,23 +1,23 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.push;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.io.File;
 import java.io.FileOutputStream;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestPushState {
     @Test
     public void testRoundTrip() throws Exception {
         final PushState state = new PushState(RuntimeEnvironment.application, "test.json");
         // Fresh state should have no registrations (and no subscriptions).
         Assert.assertTrue(state.registrations.isEmpty());
 
         final PushRegistration registration = new PushRegistration("endpoint", true, Fetched.now("uaid"), "secret");
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/push/autopush/test/TestAutopushClient.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/push/autopush/test/TestAutopushClient.java
@@ -1,23 +1,22 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.push.autopush.test;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
-import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.push.autopush.AutopushClient;
 import org.mozilla.gecko.push.autopush.AutopushClientException;
 import org.mozilla.gecko.sync.Utils;
+import org.robolectric.RobolectricTestRunner;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestAutopushClient {
     @Test
     public void testGetSenderID() throws Exception {
         final AutopushClient client = new AutopushClient("https://updates-autopush-dev.stage.mozaws.net/v1/gcm/829133274407",
                 Utils.newSynchronousExecutor());
         Assert.assertEquals("829133274407", client.getSenderIDFromServerURI());
     }
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/push/autopush/test/TestLiveAutopushClient.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/push/autopush/test/TestLiveAutopushClient.java
@@ -10,40 +10,39 @@ import java.security.PublicKey;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
 import org.mozilla.apache.commons.codec.binary.Base64;
 import org.mozilla.gecko.background.fxa.FxAccountUtils;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
-import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.push.RegisterUserAgentResponse;
 import org.mozilla.gecko.push.SubscribeChannelResponse;
 import org.mozilla.gecko.push.autopush.AutopushClient;
 import org.mozilla.gecko.push.autopush.AutopushClient.RequestDelegate;
 import org.mozilla.gecko.push.autopush.AutopushClientException;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.net.BaseResource;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.startsWith;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 
 /**
  * This test straddles an awkward line: it uses Mockito, but doesn't actually mock the service
  * endpoint.  That's why it's a <b>live</b> test: most of its value is checking that the client
  * implementation and the upstream server implementation are corresponding correctly.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 @Ignore("Live test that requires network connection -- remove this line to run this test.")
 public class TestLiveAutopushClient {
     final String serverURL = "https://updates-autopush.stage.mozaws.net/v1/gcm/829133274407";
 
     protected AutopushClient client;
 
     @Before
     public void setUp() throws Exception {
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/measurements/TestSearchCountMeasurements.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/measurements/TestSearchCountMeasurements.java
@@ -3,31 +3,31 @@
 
 package org.mozilla.gecko.telemetry.measurements;
 
 import android.content.Context;
 import android.content.SharedPreferences;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Set;
 
 import static org.junit.Assert.*;
 
 /**
  * Tests for the class that stores search count measurements.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSearchCountMeasurements {
 
     private SharedPreferences sharedPrefs;
 
     @Before
     public void setUp() throws Exception {
         sharedPrefs = RuntimeEnvironment.application.getSharedPreferences(
                 TestSearchCountMeasurements.class.getSimpleName(), Context.MODE_PRIVATE);
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/measurements/TestSessionMeasurements.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/measurements/TestSessionMeasurements.java
@@ -6,29 +6,29 @@
 
 package org.mozilla.gecko.telemetry.measurements;
 
 import android.content.Context;
 import android.content.SharedPreferences;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.telemetry.measurements.SessionMeasurements.SessionMeasurementsContainer;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.concurrent.TimeUnit;
 
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
 /**
  * Tests the session measurements class.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSessionMeasurements {
 
     private SessionMeasurements testMeasurements;
     private SharedPreferences sharedPrefs;
     private Context context;
 
     @Before
     public void setUp() throws Exception {
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncEventPingBuilderTest.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncEventPingBuilderTest.java
@@ -4,20 +4,20 @@
 package org.mozilla.gecko.telemetry.pingbuilders;
 
 import android.os.Bundle;
 
 import org.json.simple.JSONArray;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.telemetry.TelemetryContract;
+import org.robolectric.RobolectricTestRunner;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TelemetrySyncEventPingBuilderTest {
 
     @Test
     public void testGeneralShape() throws Exception {
         JSONArray payload = buildPayloadArray(123456L, "sync", "object", "method", null, null);
         Assert.assertArrayEquals(new Object[] {123456L, "sync", "method", "object"}, payload.toArray());
 
         payload = buildPayloadArray(123456L, "sync", "object", "method", "value", null);
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncPingBuilderTest.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncPingBuilderTest.java
@@ -7,28 +7,28 @@ import android.os.Bundle;
 import android.os.Parcelable;
 
 import org.json.JSONException;
 
 import org.json.simple.JSONArray;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.synchronizer.StoreBatchTracker;
 import org.mozilla.gecko.sync.telemetry.TelemetryStageCollector;
 import org.mozilla.gecko.telemetry.TelemetryLocalPing;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TelemetrySyncPingBuilderTest {
     private TelemetrySyncPingBundleBuilderTest.MockTelemetryPingStore pingStore;
     private TelemetrySyncPingBuilder builder;
 
     @Before
     public void setUp() throws Exception {
         pingStore = new TelemetrySyncPingBundleBuilderTest.MockTelemetryPingStore();
         builder = new TelemetrySyncPingBuilder();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncPingBundleBuilderTest.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetrySyncPingBundleBuilderTest.java
@@ -8,33 +8,33 @@ import android.os.Parcel;
 import android.os.Parcelable;
 
 import org.json.JSONException;
 import org.json.simple.JSONArray;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.telemetry.TelemetryContract;
 import org.mozilla.gecko.telemetry.TelemetryOutgoingPing;
 import org.mozilla.gecko.telemetry.TelemetryPing;
 import org.mozilla.gecko.telemetry.stores.TelemetryJSONFilePingStore;
 import org.mozilla.gecko.telemetry.stores.TelemetryPingStore;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Set;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TelemetrySyncPingBundleBuilderTest {
     public static class MockTelemetryPingStore extends TelemetryPingStore {
         public MockTelemetryPingStore() {
             super("default");
         }
 
         // Stable ordering for the sake of easier testing.
         private LinkedHashMap<String, TelemetryPing> pings = new LinkedHashMap<>();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TestTelemetryPingBuilder.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/pingbuilders/TestTelemetryPingBuilder.java
@@ -3,24 +3,24 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, you can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 package org.mozilla.gecko.telemetry.pingbuilders;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
 /**
  * Unit test methods of the {@link TelemetryPingBuilder} class.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestTelemetryPingBuilder {
     @Test
     public void testMandatoryFieldsNone() {
         final NoMandatoryFieldsBuilder builder = new NoMandatoryFieldsBuilder();
         builder.setNonMandatoryField();
         assertNotNull("Builder does not throw and returns a non-null value", builder.build());
     }
 
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/schedulers/TestTelemetryUploadAllPingsImmediatelyScheduler.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/schedulers/TestTelemetryUploadAllPingsImmediatelyScheduler.java
@@ -7,30 +7,30 @@
 package org.mozilla.gecko.telemetry.schedulers;
 
 import android.content.Context;
 import android.content.Intent;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.telemetry.TelemetryUploadService;
 import org.mozilla.gecko.telemetry.stores.TelemetryPingStore;
+import org.robolectric.RobolectricTestRunner;
 
 import static junit.framework.Assert.*;
 import static org.mockito.Mockito.*;
 
 /**
  * Unit tests for the upload immediately scheduler.
  *
  * When we add more schedulers, we'll likely change the interface
  * (e.g. pass in current time) and these tests will be more useful.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestTelemetryUploadAllPingsImmediatelyScheduler {
 
     private TelemetryUploadAllPingsImmediatelyScheduler testScheduler;
     private TelemetryPingStore testStore;
 
     @Before
     public void setUp() {
         testScheduler = new TelemetryUploadAllPingsImmediatelyScheduler();
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/stores/TestTelemetryJSONFilePingStore.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/telemetry/stores/TestTelemetryJSONFilePingStore.java
@@ -7,37 +7,37 @@
 package org.mozilla.gecko.telemetry.stores;
 
 import org.json.JSONObject;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.telemetry.TelemetryOutgoingPing;
 import org.mozilla.gecko.telemetry.TelemetryPing;
 import org.mozilla.gecko.util.FileUtils;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.File;
 import java.io.FileOutputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.UUID;
 
 import static org.junit.Assert.*;
 
 /**
  * Unit test methods of the {@link TelemetryJSONFilePingStore} class.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestTelemetryJSONFilePingStore {
 
     @Rule
     public TemporaryFolder tempDir = new TemporaryFolder();
     private File testDir;
     private TelemetryJSONFilePingStore testStore;
 
     @Before
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/toolbar/TestSecurityModeUtil.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/toolbar/TestSecurityModeUtil.java
@@ -6,25 +6,25 @@ package org.mozilla.gecko.toolbar;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.SiteIdentity;
 import org.mozilla.gecko.SiteIdentity.MixedMode;
 import org.mozilla.gecko.SiteIdentity.SecurityMode;
 import org.mozilla.gecko.SiteIdentity.TrackingMode;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.spy;
 import static org.mozilla.gecko.toolbar.SecurityModeUtil.IconType;
 import static org.mozilla.gecko.toolbar.SecurityModeUtil.resolve;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSecurityModeUtil {
 
     private SiteIdentity identity;
 
     @Before
     public void setUp() {
         identity = spy(new SiteIdentity());
     }
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/util/TestURIUtils.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/util/TestURIUtils.java
@@ -2,23 +2,23 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, you can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.util;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.net.URI;
 import java.net.URISyntaxException;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestURIUtils {
 
     private final String BUGZILLA_URL = "https://bugzilla.mozilla.org/enter_bug.cgi?format=guided#h=dupes%7CData%20%26%20BI%20Services%20Team%7C";
 
     @Test
     public void testIsPathEmptyWithURINoPath() throws Exception {
         final URI uri = new URI("https://google.com");
         Assert.assertTrue(URIUtils.isPathEmpty(uri));
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/util/publicsuffix/TestPublicSuffix.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/util/publicsuffix/TestPublicSuffix.java
@@ -1,23 +1,23 @@
 package org.mozilla.gecko.util.publicsuffix;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestPublicSuffix {
     @Test
     public void testStripPublicSuffix() {
         // Test empty value
         Assert.assertEquals("",
                 PublicSuffix.stripPublicSuffix(RuntimeEnvironment.application, ""));
 
         // Test domains with public suffix
--- a/mobile/android/geckoview/build.gradle
+++ b/mobile/android/geckoview/build.gradle
@@ -149,17 +149,17 @@ android {
 }
 
 dependencies {
     implementation "com.android.support:support-v4:$support_library_version"
     implementation "com.android.support:palette-v7:$support_library_version"
 
     testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
     testImplementation 'junit:junit:4.12'
-    testImplementation 'org.robolectric:robolectric:3.5.1'
+    testImplementation 'org.robolectric:robolectric:3.8'
     testImplementation 'org.mockito:mockito-core:1.10.19'
 
     androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
     androidTestImplementation 'com.android.support.test:runner:0.5'
     androidTestImplementation 'com.android.support.test:rules:0.5'
     androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
     androidTestImplementation "com.android.support:support-annotations:$support_library_version"
 }
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestBackoff.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestBackoff.java
@@ -7,26 +7,26 @@ import ch.boye.httpclientandroidlib.Http
 import ch.boye.httpclientandroidlib.ProtocolVersion;
 import ch.boye.httpclientandroidlib.message.BasicHttpResponse;
 import ch.boye.httpclientandroidlib.message.BasicStatusLine;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.helpers.MockGlobalSessionCallback;
 import org.mozilla.gecko.background.testhelpers.MockGlobalSession;
 import org.mozilla.gecko.background.testhelpers.MockSharedPreferences;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.GlobalSession;
 import org.mozilla.gecko.sync.SyncConfiguration;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
 import org.mozilla.gecko.sync.net.BasicAuthHeaderProvider;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestBackoff {
   private final String TEST_USERNAME            = "johndoe";
   private final String TEST_PASSWORD            = "password";
   private final String TEST_SYNC_KEY            = "abcdeabcdeabcdeabcdeabcdea";
   private final long   TEST_BACKOFF_IN_SECONDS  = 1201;
 
   /**
    * Test that interpretHTTPFailure calls requestBackoff if
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestBrowserIDAuthHeaderProvider.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestBrowserIDAuthHeaderProvider.java
@@ -1,22 +1,22 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.android.sync.net.test;
 
 import ch.boye.httpclientandroidlib.Header;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.net.BrowserIDAuthHeaderProvider;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestBrowserIDAuthHeaderProvider {
   @Test
   public void testHeader() {
     Header header = new BrowserIDAuthHeaderProvider("assertion").getAuthHeader(null, null, null);
 
     assertEquals("authorization", header.getName().toLowerCase());
     assertEquals("BrowserID assertion", header.getValue());
   }
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestClientsEngineStage.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestClientsEngineStage.java
@@ -14,17 +14,16 @@ import org.mozilla.android.sync.test.hel
 import org.mozilla.android.sync.test.helpers.MockServer;
 import org.mozilla.android.sync.test.helpers.MockSyncClientsEngineStage;
 import org.mozilla.gecko.background.common.log.Logger;
 import org.mozilla.gecko.background.testhelpers.CommandHelpers;
 import org.mozilla.gecko.background.testhelpers.MockClientsDataDelegate;
 import org.mozilla.gecko.background.testhelpers.MockClientsDatabaseAccessor;
 import org.mozilla.gecko.background.testhelpers.MockGlobalSession;
 import org.mozilla.gecko.background.testhelpers.MockSharedPreferences;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.CollectionKeys;
 import org.mozilla.gecko.sync.CommandProcessor.Command;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.GlobalSession;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.SyncConfiguration;
@@ -37,16 +36,17 @@ import org.mozilla.gecko.sync.delegates.
 import org.mozilla.gecko.sync.net.BaseResource;
 import org.mozilla.gecko.sync.net.BasicAuthHeaderProvider;
 import org.mozilla.gecko.sync.net.SyncStorageResponse;
 import org.mozilla.gecko.sync.repositories.NullCursorException;
 import org.mozilla.gecko.sync.repositories.android.ClientsDatabaseAccessor;
 import org.mozilla.gecko.sync.repositories.domain.ClientRecord;
 import org.mozilla.gecko.sync.telemetry.TelemetryCollector;
 import org.mozilla.gecko.sync.telemetry.TelemetryStageCollector;
+import org.robolectric.RobolectricTestRunner;
 import org.simpleframework.http.Request;
 import org.simpleframework.http.Response;
 
 import java.io.IOException;
 import java.io.PrintStream;
 import java.math.BigDecimal;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -62,17 +62,17 @@ import static org.junit.Assert.fail;
  * Some tests in this class run client/server multi-threaded code but JUnit assertions triggered
  * from background threads do not fail the test. If you see unexplained connection-related test failures,
  * an assertion on the server may have been thrown. Unfortunately, it is non-trivial to get the background
  * threads to transfer failures back to the test thread so we leave the tests in this state for now.
  *
  * One reason the server might throw an assertion is if you have not installed the crypto policies. See
  * https://wiki.mozilla.org/Mobile/Fennec/Android/Testing#JUnit4_tests for more information.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestClientsEngineStage extends MockSyncClientsEngineStage {
   public final static String LOG_TAG = "TestClientsEngSta";
 
   public TestClientsEngineStage() throws SyncConfigurationException, IllegalArgumentException, NonObjectJSONException, IOException, CryptoException, URISyntaxException {
     super();
     session = initializeSession();
     telemetryStageCollector = new TelemetryStageCollector(new TelemetryCollector());
     telemetryStageCollector.getSyncCollector().setIDs("mockUID", "mockDeviceID");
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestCredentialsEndToEnd.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestCredentialsEndToEnd.java
@@ -1,33 +1,33 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.android.sync.net.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.net.BasicAuthHeaderProvider;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 
 import ch.boye.httpclientandroidlib.Header;
 
 import static org.junit.Assert.assertEquals;
 
 /**
  * Test the transfer of a UTF-8 string from desktop, and ensure that it results in the
  * correct hashed Basic Auth header.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestCredentialsEndToEnd {
 
   public static final String REAL_PASSWORD         = "pïgéons1";
   public static final String USERNAME              = "utvm3mk6hnngiir2sp4jsxf2uvoycrv6";
   public static final String DESKTOP_PASSWORD_JSON = "{\"password\":\"pïgéons1\"}";
   public static final String BTOA_PASSWORD         = "cMOvZ8Opb25zMQ==";
   public static final int    DESKTOP_ASSERTED_SIZE = 10;
   public static final String DESKTOP_BASIC_AUTH    = "Basic dXR2bTNtazZobm5naWlyMnNwNGpzeGYydXZveWNydjY6cMOvZ8Opb25zMQ==";
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestGlobalSession.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestGlobalSession.java
@@ -17,17 +17,16 @@ import org.mozilla.android.sync.test.hel
 import org.mozilla.android.sync.test.helpers.MockGlobalSessionCallback;
 import org.mozilla.android.sync.test.helpers.MockResourceDelegate;
 import org.mozilla.android.sync.test.helpers.MockServer;
 import org.mozilla.gecko.background.testhelpers.MockAbstractNonRepositorySyncStage;
 import org.mozilla.gecko.background.testhelpers.MockGlobalSession;
 import org.mozilla.gecko.background.testhelpers.MockPrefsGlobalSession;
 import org.mozilla.gecko.background.testhelpers.MockServerSyncStage;
 import org.mozilla.gecko.background.testhelpers.MockSharedPreferences;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.EngineSettings;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.GlobalSession;
 import org.mozilla.gecko.sync.HTTPFailureException;
 import org.mozilla.gecko.sync.InfoCollections;
 import org.mozilla.gecko.sync.MetaGlobal;
 import org.mozilla.gecko.sync.NonObjectJSONException;
@@ -40,16 +39,17 @@ import org.mozilla.gecko.sync.delegates.
 import org.mozilla.gecko.sync.net.BaseResource;
 import org.mozilla.gecko.sync.net.BasicAuthHeaderProvider;
 import org.mozilla.gecko.sync.net.SyncStorageResponse;
 import org.mozilla.gecko.sync.repositories.domain.VersionConstants;
 import org.mozilla.gecko.sync.stage.BookmarksServerSyncStage;
 import org.mozilla.gecko.sync.stage.GlobalSyncStage;
 import org.mozilla.gecko.sync.stage.GlobalSyncStage.Stage;
 import org.mozilla.gecko.sync.stage.NoSuchStageException;
+import org.robolectric.RobolectricTestRunner;
 import org.simpleframework.http.Request;
 import org.simpleframework.http.Response;
 
 import java.io.IOException;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -59,17 +59,17 @@ import java.util.concurrent.TimeUnit;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestGlobalSession {
   private int          TEST_PORT                = HTTPServerTestHelper.getTestPort();
   private final String TEST_CLUSTER_URL         = "http://localhost:" + TEST_PORT;
   private final String TEST_USERNAME            = "johndoe";
   private final String TEST_PASSWORD            = "password";
   private final String TEST_SYNC_KEY            = "abcdeabcdeabcdeabcdeabcdea";
   private final long   TEST_BACKOFF_IN_SECONDS  = 2401;
   private final long   SYNC_DEADLINE            = SystemClock.elapsedRealtime() + TimeUnit.MINUTES.toMillis(30);
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestHeaderParsing.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestHeaderParsing.java
@@ -1,21 +1,21 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.android.sync.net.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.Utils;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestHeaderParsing {
 
   @SuppressWarnings("static-method")
   @Test
   public void testDecimalSecondsToMilliseconds() {
     assertEquals(Utils.decimalSecondsToMilliseconds(""),         -1);
     assertEquals(Utils.decimalSecondsToMilliseconds("1234.1.1"), -1);
     assertEquals(Utils.decimalSecondsToMilliseconds("1234"),     1234000);
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestLineByLineHandling.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestLineByLineHandling.java
@@ -3,36 +3,36 @@
 
 package org.mozilla.android.sync.net.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.helpers.HTTPServerTestHelper;
 import org.mozilla.android.sync.test.helpers.MockServer;
 import org.mozilla.gecko.background.common.log.Logger;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.net.AuthHeaderProvider;
 import org.mozilla.gecko.sync.net.BaseResource;
 import org.mozilla.gecko.sync.net.SyncStorageCollectionRequest;
 import org.mozilla.gecko.sync.net.SyncStorageCollectionRequestDelegate;
 import org.mozilla.gecko.sync.net.SyncStorageResponse;
+import org.robolectric.RobolectricTestRunner;
 import org.simpleframework.http.Request;
 import org.simpleframework.http.Response;
 
 import java.io.IOException;
 import java.io.PrintStream;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestLineByLineHandling {
   private static final int     TEST_PORT   = HTTPServerTestHelper.getTestPort();
   private static final String  TEST_SERVER = "http://localhost:" + TEST_PORT;
   private static final String  LOG_TAG     = "TestLineByLineHandling";
   static String                STORAGE_URL = TEST_SERVER + "/1.1/c6o7dvmr2c4ud2fyv6woz2u4zi22bcyd/storage/lines";
   private HTTPServerTestHelper data        = new HTTPServerTestHelper();
 
   public ArrayList<String>     lines       = new ArrayList<String>();
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestMetaGlobal.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestMetaGlobal.java
@@ -3,40 +3,40 @@
 
 package org.mozilla.android.sync.net.test;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.helpers.HTTPServerTestHelper;
 import org.mozilla.android.sync.test.helpers.MockServer;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.MetaGlobal;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.delegates.MetaGlobalDelegate;
 import org.mozilla.gecko.sync.net.BaseResource;
 import org.mozilla.gecko.sync.net.BasicAuthHeaderProvider;
 import org.mozilla.gecko.sync.net.SyncStorageResponse;
+import org.robolectric.RobolectricTestRunner;
 import org.simpleframework.http.Request;
 import org.simpleframework.http.Response;
 
 import java.util.HashSet;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestMetaGlobal {
   private static final int    TEST_PORT    = HTTPServerTestHelper.getTestPort();
   private static final String TEST_SERVER  = "http://localhost:" + TEST_PORT;
   private static final String TEST_SYNC_ID = "foobar";
 
   public static final String USER_PASS = "c6o7dvmr2c4ud2fyv6woz2u4zi22bcyd:password";
   public static final String META_URL  = TEST_SERVER + "/1.1/c6o7dvmr2c4ud2fyv6woz2u4zi22bcyd/storage/meta/global";
   private HTTPServerTestHelper data    = new HTTPServerTestHelper();
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestResource.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestResource.java
@@ -6,29 +6,29 @@ package org.mozilla.android.sync.net.tes
 import ch.boye.httpclientandroidlib.HttpResponse;
 import ch.boye.httpclientandroidlib.client.methods.HttpUriRequest;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.helpers.HTTPServerTestHelper;
 import org.mozilla.android.sync.test.helpers.MockResourceDelegate;
 import org.mozilla.android.sync.test.helpers.MockServer;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.net.BaseResource;
 import org.mozilla.gecko.sync.net.HttpResponseObserver;
+import org.robolectric.RobolectricTestRunner;
 
 import java.net.URISyntaxException;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestResource {
   private static final int    TEST_PORT   = HTTPServerTestHelper.getTestPort();
   private static final String TEST_SERVER = "http://localhost:" + TEST_PORT;
 
   private HTTPServerTestHelper data     = new HTTPServerTestHelper();
 
   @SuppressWarnings("static-method")
   @Before
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestRetryAfter.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestRetryAfter.java
@@ -2,25 +2,25 @@ package org.mozilla.android.sync.net.tes
 
 import ch.boye.httpclientandroidlib.HttpResponse;
 import ch.boye.httpclientandroidlib.ProtocolVersion;
 import ch.boye.httpclientandroidlib.impl.cookie.DateUtils;
 import ch.boye.httpclientandroidlib.message.BasicHttpResponse;
 import ch.boye.httpclientandroidlib.message.BasicStatusLine;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.net.SyncResponse;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.Date;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestRetryAfter {
   private int TEST_SECONDS = 120;
 
   @Test
   public void testRetryAfterParsesSeconds() {
     final HttpResponse response = new BasicHttpResponse(
         new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 503, "Illegal method/protocol"));
     response.addHeader("Retry-After", Long.toString(TEST_SECONDS)); // Retry-After given in seconds.
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestServer15Repository.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestServer15Repository.java
@@ -3,28 +3,28 @@
 
 package org.mozilla.android.sync.net.test;
 
 import android.os.SystemClock;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.InfoCollections;
 import org.mozilla.gecko.sync.InfoConfiguration;
 import org.mozilla.gecko.sync.repositories.NonPersistentRepositoryStateProvider;
 import org.mozilla.gecko.sync.repositories.RepositoryStateProvider;
 import org.mozilla.gecko.sync.repositories.Server15Repository;
+import org.robolectric.RobolectricTestRunner;
 
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.concurrent.TimeUnit;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestServer15Repository {
 
   private static final String COLLECTION = "bookmarks";
   private static final String COLLECTION_URL = "http://foo.com/1.5/n6ec3u5bee3tixzp2asys7bs6fve4jfw/storage";
   private static final long SYNC_DEADLINE = SystemClock.elapsedRealtime() + TimeUnit.MINUTES.toMillis(30);
 
   protected final InfoCollections infoCollections = new InfoCollections();
   protected final InfoConfiguration infoConfiguration = new InfoConfiguration();
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestSyncStorageRequest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/net/test/TestSyncStorageRequest.java
@@ -4,35 +4,35 @@
 package org.mozilla.android.sync.net.test;
 
 import org.json.simple.JSONObject;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.helpers.BaseTestStorageRequestDelegate;
 import org.mozilla.android.sync.test.helpers.HTTPServerTestHelper;
 import org.mozilla.android.sync.test.helpers.MockServer;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.net.AuthHeaderProvider;
 import org.mozilla.gecko.sync.net.BaseResource;
 import org.mozilla.gecko.sync.net.BasicAuthHeaderProvider;
 import org.mozilla.gecko.sync.net.SyncStorageRecordRequest;
 import org.mozilla.gecko.sync.net.SyncStorageResponse;
+import org.robolectric.RobolectricTestRunner;
 import org.simpleframework.http.Request;
 import org.simpleframework.http.Response;
 
 import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSyncStorageRequest {
   private static final int    TEST_PORT   = HTTPServerTestHelper.getTestPort();
   private static final String TEST_SERVER = "http://localhost:" + TEST_PORT;
 
   private static final String LOCAL_META_URL  = TEST_SERVER + "/1.1/c6o7dvmr2c4ud2fyv6woz2u4zi22bcyd/storage/meta/global";
   private static final String LOCAL_BAD_REQUEST_URL  = TEST_SERVER + "/1.1/c6o7dvmr2c4ud2fyv6woz2u4zi22bcyd/storage/bad";
 
   private static final String EXPECTED_ERROR_CODE = "12";
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestCollectionKeys.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestCollectionKeys.java
@@ -2,36 +2,36 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.android.sync.test;
 
 import org.json.simple.JSONArray;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.apache.commons.codec.binary.Base64;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CollectionKeys;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.NoCollectionKeysSetException;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.crypto.CryptoException;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Set;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestCollectionKeys {
 
   @Test
   public void testDefaultKeys() throws CryptoException, NoCollectionKeysSetException {
     CollectionKeys ck = new CollectionKeys();
     try {
       ck.defaultKeyBundle();
       fail("defaultKeys should throw.");
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestCommandProcessor.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestCommandProcessor.java
@@ -1,33 +1,33 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.android.sync.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CommandProcessor;
 import org.mozilla.gecko.sync.CommandRunner;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.GlobalSession;
 import org.mozilla.gecko.sync.NonObjectJSONException;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestCommandProcessor extends CommandProcessor {
 
   public static final String commandType = "displayURI";
   public static final String commandWithNoArgs = "{\"command\":\"displayURI\"}";
   public static final String commandWithNoType = "{\"args\":[\"https://bugzilla.mozilla.org/show_bug.cgi?id=731341\",\"PKsljsuqYbGg\"]}";
   public static final String wellFormedCommand = "{\"args\":[\"https://bugzilla.mozilla.org/show_bug.cgi?id=731341\",\"PKsljsuqYbGg\"],\"command\":\"displayURI\"}";
   public static final String wellFormedCommandWithNullArgs = "{\"args\":[\"https://bugzilla.mozilla.org/show_bug.cgi?id=731341\",null,\"PKsljsuqYbGg\",null],\"command\":\"displayURI\"}";
 
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestCryptoRecord.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestCryptoRecord.java
@@ -3,37 +3,37 @@
 
 package org.mozilla.android.sync.test;
 
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.apache.commons.codec.binary.Base64;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.crypto.CryptoException;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
 import org.mozilla.gecko.sync.repositories.domain.ClientRecord;
 import org.mozilla.gecko.sync.repositories.domain.HistoryRecord;
 import org.mozilla.gecko.sync.repositories.domain.Record;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.util.Arrays;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestCryptoRecord {
   String base64EncryptionKey = "9K/wLdXdw+nrTtXo4ZpECyHFNr4d7aYHqeg3KW9+m6Q=";
   String base64HmacKey = "MMntEfutgLTc8FlTLQFms8/xMPmCldqPlq/QQXEjx70=";
 
   @Test
   public void testBaseCryptoRecordEncrypt() throws IOException, NonObjectJSONException, CryptoException {
 
     ExtendedJSONObject clearPayload = new ExtendedJSONObject("{\"id\":\"5qRsgXWRJZXr\"," +
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestRecord.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestRecord.java
@@ -3,36 +3,36 @@
 
 package org.mozilla.android.sync.test;
 
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.db.Tab;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.repositories.domain.BookmarkRecord;
 import org.mozilla.gecko.sync.repositories.domain.ClientRecord;
 import org.mozilla.gecko.sync.repositories.domain.HistoryRecord;
 import org.mozilla.gecko.sync.repositories.domain.Record;
 import org.mozilla.gecko.sync.repositories.domain.RecordParseException;
 import org.mozilla.gecko.sync.repositories.domain.TabsRecord;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.IOException;
 import java.util.ArrayList;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestRecord {
 
   @SuppressWarnings("static-method")
   @Test
   public void testQueryRecord() throws NonObjectJSONException, IOException {
     final String expectedGUID = "Bl3n3gpKag3s";
     final String testRecord =
         "{\"id\":\"" + expectedGUID + "\"," +
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestRecordsChannel.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestRecordsChannel.java
@@ -3,39 +3,39 @@
 
 package org.mozilla.android.sync.test;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.SynchronizerHelpers.FailFetchWBORepository;
 import org.mozilla.android.sync.test.helpers.ExpectSuccessRepositorySessionFinishDelegate;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WBORepository;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.CollectionConcurrentModificationException;
 import org.mozilla.gecko.sync.SyncDeadlineReachedException;
 import org.mozilla.gecko.sync.repositories.InactiveSessionException;
 import org.mozilla.gecko.sync.repositories.InvalidSessionTransitionException;
 import org.mozilla.gecko.sync.repositories.RepositorySession;
 import org.mozilla.gecko.sync.repositories.RepositorySessionBundle;
 import org.mozilla.gecko.sync.repositories.domain.BookmarkRecord;
 import org.mozilla.gecko.sync.synchronizer.NonBufferingRecordsChannel;
 import org.mozilla.gecko.sync.synchronizer.RecordsChannel;
 import org.mozilla.gecko.sync.synchronizer.RecordsChannelDelegate;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestRecordsChannel {
 
   private WBORepository sourceRepository;
   private RepositorySession sourceSession;
   private WBORepository sinkRepository;
   private RepositorySession sinkSession;
 
   private RecordsChannelDelegate rcDelegate;
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestResetCommands.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestResetCommands.java
@@ -6,43 +6,43 @@ package org.mozilla.android.sync.test;
 import android.content.SharedPreferences;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.testhelpers.DefaultGlobalSessionCallback;
 import org.mozilla.gecko.background.testhelpers.MockPrefsGlobalSession;
 import org.mozilla.gecko.background.testhelpers.MockServerSyncStage;
 import org.mozilla.gecko.background.testhelpers.MockSharedPreferences;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.CommandProcessor;
 import org.mozilla.gecko.sync.EngineSettings;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.GlobalSession;
 import org.mozilla.gecko.sync.MetaGlobalException;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.SyncConfiguration;
 import org.mozilla.gecko.sync.SyncConfigurationException;
 import org.mozilla.gecko.sync.crypto.CryptoException;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
 import org.mozilla.gecko.sync.delegates.GlobalSessionCallback;
 import org.mozilla.gecko.sync.net.BasicAuthHeaderProvider;
 import org.mozilla.gecko.sync.stage.GlobalSyncStage;
 import org.mozilla.gecko.sync.stage.GlobalSyncStage.Stage;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.IOException;
 import java.util.HashMap;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 /**
  * Test that reset commands properly invoke the reset methods on the correct stage.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestResetCommands {
   private static final String TEST_USERNAME    = "johndoe";
   private static final String TEST_PASSWORD    = "password";
   private static final String TEST_SYNC_KEY    = "abcdeabcdeabcdeabcdeabcdea";
 
   public static void performNotify() {
     WaitHelper.getTestWaiter().performNotify();
   }
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestServer15RepositorySession.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestServer15RepositorySession.java
@@ -6,17 +6,16 @@ package org.mozilla.android.sync.test;
 import android.os.SystemClock;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.SynchronizerHelpers.TrackingWBORepository;
 import org.mozilla.android.sync.test.helpers.BaseTestStorageRequestDelegate;
 import org.mozilla.android.sync.test.helpers.HTTPServerTestHelper;
 import org.mozilla.android.sync.test.helpers.MockServer;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CollectionConcurrentModificationException;
 import org.mozilla.gecko.sync.InfoCollections;
 import org.mozilla.gecko.sync.InfoConfiguration;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
 import org.mozilla.gecko.sync.middleware.Crypto5MiddlewareRepository;
 import org.mozilla.gecko.sync.net.AuthHeaderProvider;
 import org.mozilla.gecko.sync.net.BaseResource;
@@ -24,28 +23,29 @@ import org.mozilla.gecko.sync.net.BasicA
 import org.mozilla.gecko.sync.net.SyncStorageResponse;
 import org.mozilla.gecko.sync.repositories.FetchFailedException;
 import org.mozilla.gecko.sync.repositories.NonPersistentRepositoryStateProvider;
 import org.mozilla.gecko.sync.repositories.Server15Repository;
 import org.mozilla.gecko.sync.repositories.StoreFailedException;
 import org.mozilla.gecko.sync.repositories.domain.BookmarkRecord;
 import org.mozilla.gecko.sync.repositories.domain.BookmarkRecordFactory;
 import org.mozilla.gecko.sync.synchronizer.Synchronizer;
+import org.robolectric.RobolectricTestRunner;
 import org.simpleframework.http.ContentType;
 import org.simpleframework.http.Request;
 import org.simpleframework.http.Response;
 
 import java.io.IOException;
 import java.util.concurrent.TimeUnit;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestServer15RepositorySession {
 
   public class POSTMockServer extends MockServer {
     @Override
     public void handle(Request request, Response response) {
       try {
         String content = request.getContent();
         System.out.println("Content:" + content);
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestSynchronizer.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestSynchronizer.java
@@ -6,39 +6,39 @@ package org.mozilla.android.sync.test;
 import android.content.Context;
 
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.SynchronizerHelpers.TrackingWBORepository;
 import org.mozilla.gecko.background.common.log.Logger;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WBORepository;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.repositories.FetchFailedException;
 import org.mozilla.gecko.sync.repositories.RepositorySessionBundle;
 import org.mozilla.gecko.sync.repositories.StoreFailedException;
 import org.mozilla.gecko.sync.repositories.domain.BookmarkRecord;
 import org.mozilla.gecko.sync.synchronizer.Synchronizer;
 import org.mozilla.gecko.sync.synchronizer.SynchronizerDelegate;
 import org.mozilla.gecko.sync.synchronizer.SynchronizerSession;
 import org.mozilla.gecko.sync.synchronizer.SynchronizerSessionDelegate;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.ArrayList;
 import java.util.Date;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSynchronizer {
   public static final String LOG_TAG = "TestSynchronizer";
 
   public static void assertInRangeInclusive(long earliest, long value, long latest) {
     assertTrue(earliest <= value);
     assertTrue(latest   >= value);
   }
 
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestSynchronizerSession.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestSynchronizerSession.java
@@ -5,39 +5,39 @@ package org.mozilla.android.sync.test;
 
 import android.content.Context;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.SynchronizerHelpers.DataAvailableWBORepository;
 import org.mozilla.android.sync.test.SynchronizerHelpers.ShouldSkipWBORepository;
 import org.mozilla.gecko.background.common.log.Logger;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WBORepository;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.SynchronizerConfiguration;
 import org.mozilla.gecko.sync.repositories.RepositorySessionBundle;
 import org.mozilla.gecko.sync.repositories.domain.BookmarkRecord;
 import org.mozilla.gecko.sync.repositories.domain.Record;
 import org.mozilla.gecko.sync.synchronizer.Synchronizer;
 import org.mozilla.gecko.sync.synchronizer.SynchronizerSession;
 import org.mozilla.gecko.sync.synchronizer.SynchronizerSessionDelegate;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSynchronizerSession {
   public static final String LOG_TAG = TestSynchronizerSession.class.getSimpleName();
 
   protected static void assertFirstContainsSecond(Map<String, Record> first, Map<String, Record> second) {
     for (Entry<String, Record> entry : second.entrySet()) {
       assertTrue("Expected key " + entry.getKey(), first.containsKey(entry.getKey()));
       Record record = first.get(entry.getKey());
       assertEquals(entry.getValue(), record);
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestUtils.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/TestUtils.java
@@ -1,29 +1,27 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.android.sync.test;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
-import org.mozilla.gecko.sync.SyncConstants;
 import org.mozilla.gecko.sync.Utils;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.UnsupportedEncodingException;
 import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
 import java.util.Arrays;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestUtils extends Utils {
 
   @Test
   public void testGenerateGUID() {
     for (int i = 0; i < 1000; ++i) {
       assertEquals(12, Utils.generateGuid().length());
     }
   }
--- a/mobile/android/services/src/test/java/org/mozilla/android/sync/test/helpers/test/TestHTTPServerTestHelper.java
+++ b/mobile/android/services/src/test/java/org/mozilla/android/sync/test/helpers/test/TestHTTPServerTestHelper.java
@@ -3,28 +3,28 @@
 
 package org.mozilla.android.sync.test.helpers.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.helpers.HTTPServerTestHelper;
 import org.mozilla.android.sync.test.helpers.HTTPServerTestHelper.HTTPServerAlreadyRunningError;
 import org.mozilla.android.sync.test.helpers.MockServer;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestHTTPServerTestHelper {
   public static final int TEST_PORT = HTTPServerTestHelper.getTestPort();
 
   protected MockServer mockServer = new MockServer();
 
   @Test
   public void testStartStop() {
     // Need to be able to start and stop multiple times.
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/common/log/writers/test/TestLogWriters.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/background/common/log/writers/test/TestLogWriters.java
@@ -10,27 +10,27 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.common.log.Logger;
 import org.mozilla.gecko.background.common.log.writers.LevelFilteringLogWriter;
 import org.mozilla.gecko.background.common.log.writers.LogWriter;
 import org.mozilla.gecko.background.common.log.writers.PrintLogWriter;
 import org.mozilla.gecko.background.common.log.writers.SimpleTagLogWriter;
 import org.mozilla.gecko.background.common.log.writers.StringLogWriter;
 import org.mozilla.gecko.background.common.log.writers.ThreadLocalTagLogWriter;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.Arrays;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestLogWriters {
 
   public static final String TEST_LOG_TAG_1 = "TestLogTag1";
   public static final String TEST_LOG_TAG_2 = "TestLogTag2";
 
   public static final String TEST_MESSAGE_1  = "LOG TEST MESSAGE one";
   public static final String TEST_MESSAGE_2  = "LOG TEST MESSAGE two";
   public static final String TEST_MESSAGE_3  = "LOG TEST MESSAGE three";
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestClientsDatabase.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestClientsDatabase.java
@@ -7,28 +7,28 @@ import android.content.Context;
 import android.database.Cursor;
 
 import org.json.simple.JSONArray;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.repositories.NullCursorException;
 import org.mozilla.gecko.sync.repositories.android.ClientsDatabase;
 import org.mozilla.gecko.sync.repositories.android.RepoUtils;
 import org.mozilla.gecko.sync.repositories.domain.ClientRecord;
 import org.mozilla.gecko.sync.setup.Constants;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.ArrayList;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestClientsDatabase {
 
     protected ClientsDatabase db;
 
     @Before
     public void setUp() {
         final Context context = RuntimeEnvironment.application;
         db = new ClientsDatabase(context);
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestClientsDatabaseAccessor.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestClientsDatabaseAccessor.java
@@ -9,27 +9,27 @@ import java.util.List;
 import java.util.Map;
 
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.testhelpers.CommandHelpers;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CommandProcessor.Command;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.repositories.NullCursorException;
 import org.mozilla.gecko.sync.repositories.android.ClientsDatabaseAccessor;
 import org.mozilla.gecko.sync.repositories.domain.ClientRecord;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import android.content.Context;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestClientsDatabaseAccessor {
 
     ClientsDatabaseAccessor db;
 
     @Before
     public void setUp() {
         final Context context = RuntimeEnvironment.application;
         db = new ClientsDatabaseAccessor(context);
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestTabsProvider.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestTabsProvider.java
@@ -11,24 +11,24 @@ import android.net.Uri;
 import android.os.RemoteException;
 
 import org.json.simple.JSONArray;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.db.BrowserContract;
 import org.mozilla.gecko.sync.repositories.android.BrowserContractHelpers;
 import org.mozilla.gecko.sync.repositories.android.FennecTabsRepository;
 import org.mozilla.gecko.sync.repositories.domain.TabsRecord;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.shadows.ShadowContentResolver;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestTabsProvider {
     public static final String TEST_CLIENT_GUID = "test guid"; // Real GUIDs never contain spaces.
     public static final String TEST_CLIENT_NAME = "test client name";
 
     public static final String CLIENTS_GUID_IS = BrowserContract.Clients.GUID + " = ?";
     public static final String TABS_CLIENT_GUID_IS = BrowserContract.Tabs.CLIENT_GUID + " = ?";
 
     protected Tab testTab1;
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/fxa/test/TestFxAccountClient20.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/background/fxa/test/TestFxAccountClient20.java
@@ -2,25 +2,25 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.background.fxa.test;
 
 import junit.framework.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.fxa.FxAccountClient20;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.net.BaseResource;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URISyntaxException;
 import java.util.concurrent.Executor;
 import java.util.concurrent.Executors;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFxAccountClient20 {
   protected static class MockFxAccountClient20 extends FxAccountClient20 {
     public MockFxAccountClient20(String serverURI, Executor executor) {
       super(serverURI, executor);
     }
 
     // Public for testing.
     @Override
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/fxa/test/TestFxAccountUtils.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/background/fxa/test/TestFxAccountUtils.java
@@ -3,30 +3,30 @@
 
 package org.mozilla.gecko.background.fxa.test;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.apache.commons.codec.binary.Base64;
 import org.mozilla.gecko.background.fxa.FxAccountUtils;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
 import org.mozilla.gecko.sync.net.SRPConstants;
+import org.robolectric.RobolectricTestRunner;
 
 import java.math.BigInteger;
 
 /**
  * Test vectors from
  * <a href="https://wiki.mozilla.org/Identity/AttachedServices/KeyServerProtocol#stretch-KDF">https://wiki.mozilla.org/Identity/AttachedServices/KeyServerProtocol#stretch-KDF</a>
  * and
  * <a href="https://github.com/mozilla/fxa-auth-server/wiki/onepw-protocol/5a9bc81e499306d769ca19b40b50fa60123df15d">https://github.com/mozilla/fxa-auth-server/wiki/onepw-protocol/5a9bc81e499306d769ca19b40b50fa60123df15d</a>.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFxAccountUtils {
   protected static void assertEncoding(String base16String, String utf8String) throws Exception {
     Assert.assertEquals(base16String, FxAccountUtils.bytes(utf8String));
   }
 
   @Test
   public void testUTF8Encoding() throws Exception {
     assertEncoding("616e6472c3a9406578616d706c652e6f7267", "andré@example.org");
deleted file mode 100644
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/testhelpers/TestRunner.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * The MIT License
- * 
- * Copyright (c) 2010 Xtreme Labs and Pivotal Labs
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-package org.mozilla.gecko.background.testhelpers;
-
-import org.junit.runners.model.InitializationError;
-import org.robolectric.RobolectricTestRunner;
-import org.robolectric.annotation.Config;
-import org.robolectric.manifest.AndroidManifest;
-import org.robolectric.res.FileFsFile;
-import org.robolectric.res.FsFile;
-import org.robolectric.util.Logger;
-import org.robolectric.util.ReflectionHelpers;
-
-/**
- * Test runner customized for running unit tests either through the Gradle CLI or
- * Android Studio. The runner uses the build type and build flavor to compute the
- * resource, asset, and AndroidManifest paths.
- *
- * This test runner requires that you set the 'constants' field on the @Config
- * annotation (or the org.robolectric.Config.properties file) for your tests.
- *
- * This is a modified version of
- * https://github.com/robolectric/robolectric/blob/8676da2daa4c140679fb5903696b8191415cec8f/robolectric/src/main/java/org/robolectric/RobolectricGradleTestRunner.java
- * that uses a Gradle `buildConfigField` to find build outputs.
- * See https://github.com/robolectric/robolectric/issues/1648#issuecomment-113731011.
- */
-public class TestRunner extends RobolectricTestRunner {
-    private FsFile buildFolder;
-
-    public TestRunner(Class<?> klass) throws InitializationError {
-        super(klass);
-    }
-
-    @Override
-    protected AndroidManifest getAppManifest(Config config) {
-        if (config.constants() == Void.class) {
-            Logger.error("Field 'constants' not specified in @Config annotation");
-            Logger.error("This is required when using RobolectricGradleTestRunner!");
-            throw new RuntimeException("No 'constants' field in @Config annotation!");
-        }
-
-        buildFolder = FileFsFile.from(getBuildDir(config)).join("intermediates");
-
-        final String type = getType(config);
-        final String flavor = getFlavor(config);
-        final String packageName = getPackageName(config);
-
-        final FsFile assets = buildFolder.join("assets", flavor, type);;
-        final FsFile manifest = buildFolder.join("manifests", "full", flavor, type, "AndroidManifest.xml");
-
-        final FsFile res;
-        if (buildFolder.join("res", "merged").exists()) {
-            res = buildFolder.join("res", "merged", flavor, type);
-        } else if(buildFolder.join("res").exists()) {
-            res = buildFolder.join("res", flavor, type);
-        } else {
-            throw new IllegalStateException("No resource folder found");
-        }
-
-        Logger.debug("Robolectric assets directory: " + assets.getPath());
-        Logger.debug("   Robolectric res directory: " + res.getPath());
-        Logger.debug("   Robolectric manifest path: " + manifest.getPath());
-        Logger.debug("    Robolectric package name: " + packageName);
-        return new AndroidManifest(manifest, res, assets, packageName);
-    }
-
-    private static String getType(Config config) {
-        try {
-            return ReflectionHelpers.getStaticField(config.constants(), "BUILD_TYPE");
-        } catch (Throwable e) {
-            return null;
-        }
-    }
-
-    private static String getFlavor(Config config) {
-        try {
-            return ReflectionHelpers.getStaticField(config.constants(), "FLAVOR");
-        } catch (Throwable e) {
-            return null;
-        }
-    }
-
-    private static String getPackageName(Config config) {
-        try {
-            final String packageName = config.packageName();
-            if (packageName != null && !packageName.isEmpty()) {
-                return packageName;
-            } else {
-                return ReflectionHelpers.getStaticField(config.constants(), "APPLICATION_ID");
-            }
-        } catch (Throwable e) {
-            return null;
-        }
-    }
-
-    private String getBuildDir(Config config) {
-        try {
-            return ReflectionHelpers.getStaticField(config.constants(), "BUILD_DIR");
-        } catch (Throwable e) {
-            return null;
-        }
-    }
-}
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestASNUtils.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestASNUtils.java
@@ -1,23 +1,23 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.browserid.test;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.browserid.ASNUtils;
 import org.mozilla.gecko.sync.Utils;
+import org.robolectric.RobolectricTestRunner;
 
 import java.math.BigInteger;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestASNUtils {
   public void doTestEncodeDecodeArrays(int length1, int length2) {
     if (4 + length1 + length2 > 127) {
       throw new IllegalArgumentException("Total length must be < 128 - 4.");
     }
     byte[] first = Utils.generateRandomBytes(length1);
     byte[] second = Utils.generateRandomBytes(length2);
     byte[] encoded = ASNUtils.encodeTwoArraysToASN1(first, second);
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestDSACryptoImplementation.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestDSACryptoImplementation.java
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.browserid.test;
 
 import junit.framework.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.browserid.BrowserIDKeyPair;
 import org.mozilla.gecko.browserid.DSACryptoImplementation;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
+import org.robolectric.RobolectricTestRunner;
 
 import java.math.BigInteger;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestDSACryptoImplementation {
   @Test
   public void testToJSONObject() throws Exception {
     BigInteger p = new BigInteger("fca682ce8e12caba26efccf7110e526db078b05edecbcd1eb4a208f3ae1617ae01f35b91a47e6df63413c5e12ed0899bcd132acd50d99151bdc43ee737592e17", 16);
     BigInteger q = new BigInteger("962eddcc369cba8ebb260ee6b6a126d9346e38c5", 16);
     BigInteger g = new BigInteger("678471b27a9cf44ee91a49c5147db1a9aaf244f05a434d6486931d2d14271b9e35030b71fd73da179069b32e2935630e1c2062354d0da20a6c416e50be794ca4", 16);
     BigInteger x = new BigInteger("9516d860392003db5a4f168444903265467614db", 16);
     BigInteger y = new BigInteger("455152a0e499f5c9d11f9f1868c8b868b1443ca853843226a5a9552dd909b4bdba879acc504acb690df0348d60e63ea37e8c7f075302e0df5bcdc76a383888a0", 16);
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestJSONWebTokenUtils.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestJSONWebTokenUtils.java
@@ -1,29 +1,29 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.browserid.test;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.browserid.BrowserIDKeyPair;
 import org.mozilla.gecko.browserid.DSACryptoImplementation;
 import org.mozilla.gecko.browserid.JSONWebTokenUtils;
 import org.mozilla.gecko.browserid.RSACryptoImplementation;
 import org.mozilla.gecko.browserid.SigningPrivateKey;
 import org.mozilla.gecko.browserid.VerifyingPublicKey;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
+import org.robolectric.RobolectricTestRunner;
 
 import java.math.BigInteger;
 import java.security.GeneralSecurityException;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestJSONWebTokenUtils {
   public void doTestEncodeDecode(BrowserIDKeyPair keyPair) throws Exception {
     SigningPrivateKey privateKey = keyPair.getPrivate();
     VerifyingPublicKey publicKey = keyPair.getPublic();
 
     ExtendedJSONObject o = new ExtendedJSONObject();
     o.put("key", "value");
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestRSACryptoImplementation.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/browserid/test/TestRSACryptoImplementation.java
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.browserid.test;
 
 import junit.framework.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.browserid.BrowserIDKeyPair;
 import org.mozilla.gecko.browserid.RSACryptoImplementation;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
+import org.robolectric.RobolectricTestRunner;
 
 import java.math.BigInteger;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestRSACryptoImplementation {
   @Test
   public void testToJSONObject() throws Exception {
     BigInteger n = new BigInteger("7042170764319402120473546823641395184140303948430445023576085129538272863656735924617881022040465877164076593767104512065359975488480629290310209335113577");
     BigInteger e = new BigInteger("65537");
     BigInteger d = new BigInteger("2050102629239206449128199335463237235732683202345308155771672920433658970744825199440426256856862541525088288448769859770132714705204296375901885294992205");
 
     BrowserIDKeyPair keyPair = new BrowserIDKeyPair(
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserContractTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserContractTest.java
@@ -1,20 +1,20 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.db;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BrowserContractTest {
     @Test
     /**
      * Test that bookmark and sorting order clauses are set correctly
      */
     public void testGetCombinedFrecencySortOrder() throws Exception {
         String sqlNoBookmarksDesc = BrowserContract.getCombinedFrecencySortOrder(false, false);
         String sqlNoBookmarksAsc = BrowserContract.getCombinedFrecencySortOrder(false, true);
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserDatabaseHelperTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserDatabaseHelperTest.java
@@ -6,30 +6,30 @@ package org.mozilla.gecko.db;
 import android.content.ContentValues;
 import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
 
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import org.mozilla.gecko.db.BrowserContract.Bookmarks;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Random;
 import java.util.UUID;
 
 import static org.junit.Assert.*;
 
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BrowserDatabaseHelperTest {
     private TestSQLiteOpenHelper helper = new TestSQLiteOpenHelper();
     private final long NEVER_SYNCED_BOOKMARKS = -1;
     private final int DEFAULT_BOOKMARKS_COUNT = 7;
     private Random random;
 
     @Before
     public void setUp() {
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderBookmarksTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderBookmarksTest.java
@@ -12,20 +12,20 @@ import android.net.Uri;
 import android.os.Bundle;
 import android.os.RemoteException;
 
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.db.DelegatingTestContentProvider;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.db.BrowserContract.Bookmarks;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.repositories.android.BrowserContractHelpers;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.shadows.ShadowContentResolver;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Random;
 import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
@@ -46,17 +46,17 @@ import static org.mozilla.gecko.db.Brows
         .getBookmarksTestSyncIncrementLocalVersionUri;
 import static org.mozilla.gecko.db.BrowserProviderGeneralTest.insertBookmark;
 import static org.mozilla.gecko.db.BrowserProviderGeneralTest.withDeleted;
 import static org.mozilla.gecko.db.BrowserProviderGeneralTest.withSync;
 
 /**
  * Testing direct interactions with bookmarks through BrowserProvider
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BrowserProviderBookmarksTest {
     private ContentProviderClient bookmarksClient;
     private ContentProvider provider;
 
     @Before
     public void setUp() throws Exception {
         provider = DelegatingTestContentProvider.createDelegatingBrowserProvider();
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderGeneralTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderGeneralTest.java
@@ -11,30 +11,30 @@ import android.net.Uri;
 import android.os.Bundle;
 import android.os.RemoteException;
 
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.db.DelegatingTestContentProvider;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.repositories.android.BrowserContractHelpers;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.shadows.ShadowContentResolver;
 
 import java.util.ArrayList;
 import java.util.UUID;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BrowserProviderGeneralTest {
     final static long INVALID_TIMESTAMP = -1;
     final static Uri bookmarksTestUri = withTest(BrowserContract.Bookmarks.CONTENT_URI);
     final static Uri bookmarksTestSyncUri = withSync(bookmarksTestUri);
     final static Uri getBookmarksTestSyncIncrementLocalVersionUri = bookmarksTestSyncUri
             .buildUpon()
             .appendQueryParameter(BrowserContract.PARAM_INCREMENT_LOCAL_VERSION_FROM_SYNC, "true")
             .build();
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderHistoryTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderHistoryTest.java
@@ -10,27 +10,27 @@ import android.database.Cursor;
 import android.net.Uri;
 import android.os.Bundle;
 import android.os.RemoteException;
 
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.shadows.ShadowContentResolver;
 
 import static org.junit.Assert.*;
 
 /**
  * Testing functionality exposed by BrowserProvider ContentProvider (history, bookmarks, etc).
  * This is WIP junit4 port of robocop tests at org.mozilla.gecko.tests.testBrowserProvider.
  * See Bug 1269492
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BrowserProviderHistoryTest extends BrowserProviderHistoryVisitsTestBase {
     private ContentProviderClient thumbnailClient;
     private Uri thumbnailTestUri;
     private Uri expireHistoryNormalUri;
     private Uri expireHistoryAggressiveUri;
 
     private static final long THREE_MONTHS = 1000L * 60L * 60L * 24L * 30L * 3L;
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderHistoryVisitsTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderHistoryVisitsTest.java
@@ -4,23 +4,23 @@
 package org.mozilla.gecko.db;
 
 import android.content.ContentValues;
 import android.database.Cursor;
 import android.net.Uri;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 
 import org.mozilla.gecko.db.BrowserContract.History;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 /**
  * Testing insertion/deletion of visits as by-product of updating history records through BrowserProvider
  */
 public class BrowserProviderHistoryVisitsTest extends BrowserProviderHistoryVisitsTestBase {
     @Test
     /**
      * Testing updating history records without affecting visits
      */
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderVisitsTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderVisitsTest.java
@@ -7,20 +7,20 @@ import android.content.ContentValues;
 import android.database.Cursor;
 import android.net.Uri;
 import android.os.RemoteException;
 
 import static org.junit.Assert.*;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.db.BrowserContract.Visits;
+import org.robolectric.RobolectricTestRunner;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 /**
  * Testing direct interactions with visits through BrowserProvider
  */
 public class BrowserProviderVisitsTest extends BrowserProviderHistoryVisitsTestBase {
     @Test
     /**
      * Test that default visit parameters are set on insert.
      */
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/LocalBrowserDBTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/LocalBrowserDBTest.java
@@ -14,31 +14,31 @@ import android.net.Uri;
 import android.os.RemoteException;
 import android.support.annotation.Nullable;
 
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.db.DelegatingTestContentProvider;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.repositories.android.BrowserContractHelpers;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 import org.robolectric.shadows.ShadowContentResolver;
 
 import java.util.HashMap;
 import java.util.Map;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class LocalBrowserDBTest {
     private static final long INVALID_ID = -1;
     private static final String BOOKMARK_URL = "https://www.mozilla.org";
     private static final String BOOKMARK_TITLE = "mozilla";
 
     private static final String UPDATE_URL = "https://bugzilla.mozilla.org";
     private static final String UPDATE_TITLE = "bugzilla";
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/TestSkewHandler.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/TestSkewHandler.java
@@ -3,23 +3,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.fxa;
 
 import ch.boye.httpclientandroidlib.impl.cookie.DateUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.fxa.SkewHandler;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.net.BaseResource;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSkewHandler {
   public TestSkewHandler() {
   }
 
   @Test
   public void testSkewUpdating() throws Throwable {
     SkewHandler h = new SkewHandler("foo.com");
     assertEquals(0L, h.getSkewInSeconds());
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/authenticator/AndroidFxAccountTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/authenticator/AndroidFxAccountTest.java
@@ -3,25 +3,25 @@
 
 package org.mozilla.gecko.fxa.authenticator;
 
 import android.content.Context;
 import android.content.SharedPreferences;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 
 import java.util.HashSet;
 import java.util.Set;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class AndroidFxAccountTest {
     @Test
     public void testMigrateSharedPreferences() throws Exception {
         final SharedPreferences preferences = RuntimeEnvironment.application.getSharedPreferences("new_prefs", Context.MODE_PRIVATE);
         final SharedPreferences oldPreferences = RuntimeEnvironment.application.getSharedPreferences("old_prefs", Context.MODE_PRIVATE);
 
         // Test trivial case: nothing to migrate.
         SharedPreferences newPrefs = AndroidFxAccount.doMaybeMigrateSharedPreferences(preferences, oldPreferences);
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceListUpdater.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceListUpdater.java
@@ -15,20 +15,20 @@ import android.os.RemoteException;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.mozilla.gecko.background.db.DelegatingTestContentProvider;
 import org.mozilla.gecko.background.fxa.FxAccountClient;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.db.BrowserContract;
 import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount;
 import org.mozilla.gecko.fxa.login.State;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.shadows.ShadowContentResolver;
 
 import java.util.List;
 import java.util.UUID;
 
 import static java.util.Objects.deepEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -36,17 +36,17 @@ import static org.junit.Assert.fail;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.eq;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFxAccountDeviceListUpdater {
 
     @Before
     public void init() {
         // Process Mockito annotations
         MockitoAnnotations.initMocks(this);
         fxaDevicesUpdater = spy(new FxAccountDeviceListUpdater(fxAccount, contentResolver));
     }
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceRegistrator.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceRegistrator.java
@@ -3,24 +3,24 @@
 
 package org.mozilla.gecko.fxa.devices;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.when;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFxAccountDeviceRegistrator {
 
     @Mock
     AndroidFxAccount fxAccount;
 
     @Before
     public void init() {
         // Process Mockito annotations
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/login/TestFxAccountLoginStateMachine.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/login/TestFxAccountLoginStateMachine.java
@@ -4,29 +4,29 @@
 package org.mozilla.gecko.fxa.login;
 
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.fxa.FxAccountClient;
 import org.mozilla.gecko.background.fxa.FxAccountUtils;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.browserid.BrowserIDKeyPair;
 import org.mozilla.gecko.browserid.RSACryptoImplementation;
 import org.mozilla.gecko.fxa.login.FxAccountLoginStateMachine.LoginStateMachineDelegate;
 import org.mozilla.gecko.fxa.login.FxAccountLoginTransition.Transition;
 import org.mozilla.gecko.fxa.login.State.StateLabel;
 import org.mozilla.gecko.sync.Utils;
+import org.robolectric.RobolectricTestRunner;
 
 import java.security.NoSuchAlgorithmException;
 import java.util.LinkedList;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFxAccountLoginStateMachine {
   // private static final String TEST_AUDIENCE = "http://testAudience.com";
   private static final String TEST_EMAIL = "test@test.com";
   private static byte[] TEST_EMAIL_UTF8;
   private static final String TEST_PASSWORD = "testtest";
   private static byte[] TEST_PASSWORD_UTF8;
   private static byte[] TEST_QUICK_STRETCHED_PW;
   private static byte[] TEST_UNWRAPKB;
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/login/TestStateFactory.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/login/TestStateFactory.java
@@ -2,24 +2,24 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.fxa.login;
 
 import junit.framework.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.fxa.FxAccountUtils;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.browserid.BrowserIDKeyPair;
 import org.mozilla.gecko.browserid.DSACryptoImplementation;
 import org.mozilla.gecko.fxa.login.State.StateLabel;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.Utils;
+import org.robolectric.RobolectricTestRunner;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestStateFactory {
   @Test
   public void testGetStateV3() throws Exception {
     MigratedFromSync11 migrated = new MigratedFromSync11("email", "uid", true, "password");
 
     // For the current version, we expect to read back what we wrote.
     ExtendedJSONObject o;
     State state;
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestBase32.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestBase32.java
@@ -1,26 +1,26 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.crypto.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.apache.commons.codec.binary.Base32;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.Utils;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.UnsupportedEncodingException;
 import java.util.Arrays;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestBase32 {
 
   public static void assertSame(byte[] arrayOne, byte[] arrayTwo) {
     assertTrue(Arrays.equals(arrayOne, arrayTwo));
   }
 
   @Test
   public void testBase32() throws UnsupportedEncodingException {
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestCryptoInfo.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestCryptoInfo.java
@@ -1,31 +1,31 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.crypto.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.apache.commons.codec.binary.Base64;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.crypto.CryptoException;
 import org.mozilla.gecko.sync.crypto.CryptoInfo;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.UnsupportedEncodingException;
 import java.security.InvalidKeyException;
 import java.security.NoSuchAlgorithmException;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestCryptoInfo {
 
   @Test
   public void testEncryptedHMACIsSet() throws CryptoException, UnsupportedEncodingException, InvalidKeyException, NoSuchAlgorithmException {
     KeyBundle kb = KeyBundle.withRandomKeys();
     CryptoInfo encrypted = CryptoInfo.encrypt("plaintext".getBytes("UTF-8"), kb);
     assertSame(kb, encrypted.getKeys());
     assertTrue(encrypted.generatedHMACIsHMAC());
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestHKDF.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestHKDF.java
@@ -1,32 +1,32 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.crypto.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.apache.commons.codec.binary.Base64;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.crypto.HKDF;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.Arrays;
 
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 /*
  * This class tests the HKDF.java class.
  * The tests are the 3 HMAC-based test cases
  * from the RFC 5869 specification.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestHKDF {
   @Test
   public void testCase1() {
     String IKM  = "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b";
     String salt = "000102030405060708090a0b0c";
     String info = "f0f1f2f3f4f5f6f7f8f9";
     int L       = 42;
     String PRK  = "077709362c2e32df0ddc3f0dc47bba63" +
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestKeyBundle.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestKeyBundle.java
@@ -1,29 +1,29 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.crypto.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.apache.commons.codec.binary.Base64;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.crypto.CryptoException;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.UnsupportedEncodingException;
 import java.util.Arrays;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestKeyBundle {
   @Test
   public void testCreateKeyBundle() throws UnsupportedEncodingException, CryptoException {
     String username              = "smqvooxj664hmrkrv6bw4r4vkegjhkns";
     String friendlyBase32SyncKey = "gbh7teqqcgyzd65svjgibd7tqy";
     String base64EncryptionKey   = "069EnS3EtDK4y1tZ1AyKX+U7WEsWRp9b" +
                                    "RIKLdW/7aoE=";
     String base64HmacKey         = "LF2YCS1QCgSNCf0BCQvQ06SGH8jqJDi9" +
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestPBKDF2.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestPBKDF2.java
@@ -1,34 +1,34 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.crypto.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.crypto.PBKDF2;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.UnsupportedEncodingException;
 import java.security.GeneralSecurityException;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
 /**
  * Test PBKDF2 implementations against vectors from
  * <dl>
  * <dt>SHA-256</dt>
  * <dd><a href="https://github.com/ircmaxell/PHP-PasswordLib/blob/master/test/Data/Vectors/pbkdf2-draft-josefsson-sha256.test-vectors">https://github.com/ircmaxell/PHP-PasswordLib/blob/master/test/Data/Vectors/pbkdf2-draft-josefsson-sha256.test-vectors</a></dd>
  * <dd><a href="https://gitorious.org/scrypt/nettle-scrypt/blobs/37c0d5288e991604fe33dba2f1724986a8dddf56/testsuite/pbkdf2-test.c">https://gitorious.org/scrypt/nettle-scrypt/blobs/37c0d5288e991604fe33dba2f1724986a8dddf56/testsuite/pbkdf2-test.c</a></dd>
  * </dl>
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestPBKDF2 {
 
   @Test
   public final void testPBKDF2SHA256A() throws UnsupportedEncodingException, GeneralSecurityException {
     String  p = "password";
     String  s = "salt";
     int dkLen = 32;
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestPersistedCrypto5Keys.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestPersistedCrypto5Keys.java
@@ -2,29 +2,29 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.crypto.test;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.testhelpers.MockSharedPreferences;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CollectionKeys;
 import org.mozilla.gecko.sync.NoCollectionKeysSetException;
 import org.mozilla.gecko.sync.crypto.CryptoException;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
 import org.mozilla.gecko.sync.crypto.PersistedCrypto5Keys;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestPersistedCrypto5Keys {
   MockSharedPreferences prefs = null;
 
   @Before
   public void setUp() {
     prefs = new MockSharedPreferences();
   }
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestSRPConstants.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/crypto/test/TestSRPConstants.java
@@ -1,22 +1,22 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.crypto.test;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.net.SRPConstants;
+import org.robolectric.RobolectricTestRunner;
 
 import java.math.BigInteger;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestSRPConstants extends SRPConstants {
   public void assertSRPConstants(SRPConstants.Parameters params, int bitLength) {
     Assert.assertNotNull(params.g);
     Assert.assertNotNull(params.N);
     Assert.assertEquals(bitLength, bitLength);
     Assert.assertEquals(bitLength / 8, params.byteLength);
     Assert.assertEquals(bitLength / 4, params.hexLength);
     BigInteger N = params.N;
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/middleware/test/TestCrypto5MiddlewareRepositorySession.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/middleware/test/TestCrypto5MiddlewareRepositorySession.java
@@ -7,37 +7,37 @@ import junit.framework.AssertionFailedEr
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.helpers.ExpectSuccessRepositorySessionFetchRecordsDelegate;
 import org.mozilla.android.sync.test.helpers.ExpectSuccessRepositorySessionFinishDelegate;
 import org.mozilla.android.sync.test.helpers.ExpectSuccessRepositorySessionStoreDelegate;
 import org.mozilla.android.sync.test.helpers.ExpectSuccessRepositoryWipeDelegate;
 import org.mozilla.gecko.background.testhelpers.MockRecord;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WBORepository;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.SyncException;
 import org.mozilla.gecko.sync.crypto.CryptoException;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
 import org.mozilla.gecko.sync.middleware.Crypto5MiddlewareRepository;
 import org.mozilla.gecko.sync.middleware.Crypto5MiddlewareRepositorySession;
 import org.mozilla.gecko.sync.repositories.InactiveSessionException;
 import org.mozilla.gecko.sync.repositories.NoStoreDelegateException;
 import org.mozilla.gecko.sync.repositories.RepositorySession;
 import org.mozilla.gecko.sync.repositories.domain.BookmarkRecord;
 import org.mozilla.gecko.sync.repositories.domain.Record;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestCrypto5MiddlewareRepositorySession {
   public static WaitHelper getTestWaiter() {
     return WaitHelper.getTestWaiter();
   }
 
   public static void performWait(Runnable runnable) {
     getTestWaiter().performWait(runnable);
   }
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/net/test/TestHMACAuthHeaderProvider.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/net/test/TestHMACAuthHeaderProvider.java
@@ -4,27 +4,27 @@
 package org.mozilla.gecko.sync.net.test;
 
 import ch.boye.httpclientandroidlib.client.methods.HttpGet;
 import ch.boye.httpclientandroidlib.client.methods.HttpPost;
 import ch.boye.httpclientandroidlib.client.methods.HttpRequestBase;
 import ch.boye.httpclientandroidlib.client.methods.HttpUriRequest;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.net.HMACAuthHeaderProvider;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import java.security.InvalidKeyException;
 import java.security.NoSuchAlgorithmException;
 
 import static org.junit.Assert.assertEquals;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestHMACAuthHeaderProvider {
   // Expose a few protected static member functions as public for testing.
   protected static class LeakyHMACAuthHeaderProvider extends HMACAuthHeaderProvider {
     public LeakyHMACAuthHeaderProvider(String identifier, String key) {
       super(identifier, key);
     }
 
     public static String getRequestString(HttpUriRequest request, long timestampInSeconds, String nonce, String extra) {
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/net/test/TestHawkAuthHeaderProvider.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/net/test/TestHawkAuthHeaderProvider.java
@@ -9,32 +9,32 @@ import ch.boye.httpclientandroidlib.clie
 import ch.boye.httpclientandroidlib.client.methods.HttpRequestBase;
 import ch.boye.httpclientandroidlib.client.methods.HttpUriRequest;
 import ch.boye.httpclientandroidlib.entity.StringEntity;
 import ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient;
 import ch.boye.httpclientandroidlib.message.BasicHeader;
 import ch.boye.httpclientandroidlib.protocol.BasicHttpContext;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.net.HawkAuthHeaderProvider;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import java.security.InvalidKeyException;
 import java.security.NoSuchAlgorithmException;
 
 import static org.junit.Assert.assertEquals;
 
 /**
  * These test vectors were taken from
  * <a href="https://github.com/hueniverse/hawk/blob/871cc597973110900467bd3dfb84a3c892f678fb/README.md">https://github.com/hueniverse/hawk/blob/871cc597973110900467bd3dfb84a3c892f678fb/README.md</a>.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestHawkAuthHeaderProvider {
   // Expose a few protected static member functions as public for testing.
   protected static class LeakyHawkAuthHeaderProvider extends HawkAuthHeaderProvider {
     public LeakyHawkAuthHeaderProvider(String tokenId, byte[] reqHMACKey) {
       // getAuthHeader takes includePayloadHash as a parameter.
       super(tokenId, reqHMACKey, false, 0L);
     }
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/net/test/TestUserAgentHeaders.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/net/test/TestUserAgentHeaders.java
@@ -10,31 +10,31 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.helpers.HTTPServerTestHelper;
 import org.mozilla.android.sync.test.helpers.MockServer;
 import org.mozilla.gecko.background.fxa.FxAccountClient20;
 import org.mozilla.gecko.background.fxa.FxAccountClient20.RequestDelegate;
 import org.mozilla.gecko.background.fxa.FxAccountClient20.RecoveryEmailStatusResponse;
 import org.mozilla.gecko.background.fxa.FxAccountClientException.FxAccountClientRemoteException;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.fxa.FxAccountConstants;
 import org.mozilla.gecko.sync.SyncConstants;
 import org.mozilla.gecko.sync.net.AuthHeaderProvider;
 import org.mozilla.gecko.sync.net.BaseResource;
 import org.mozilla.gecko.sync.net.SyncStorageRecordRequest;
 import org.mozilla.gecko.sync.net.SyncStorageRequestDelegate;
 import org.mozilla.gecko.sync.net.SyncStorageResponse;
+import org.robolectric.RobolectricTestRunner;
 import org.simpleframework.http.Request;
 import org.simpleframework.http.Response;
 
 import java.util.concurrent.Executors;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestUserAgentHeaders {
   private static final int TEST_PORT = HTTPServerTestHelper.getTestPort();
   private static final String TEST_SERVER = "http://localhost:" + TEST_PORT;
 
   protected final HTTPServerTestHelper data = new HTTPServerTestHelper();
 
   protected class UserAgentServer extends MockServer {
     public String lastUserAgent = null;
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/BookmarksSessionHelperTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/BookmarksSessionHelperTest.java
@@ -1,22 +1,22 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.repositories.android;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.db.BrowserContract;
 import org.mozilla.gecko.sync.repositories.domain.BookmarkRecord;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BookmarksSessionHelperTest {
     /**
      * Trivial test that forbidden records such as pinned items
      * will be ignored if processed.
      */
     @Test
     public void testShouldIgnore() throws Exception {
         final long now = System.currentTimeMillis();
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/BrowserContractHelpersTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/BrowserContractHelpersTest.java
@@ -1,20 +1,20 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.repositories.android;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BrowserContractHelpersTest {
     @Test
     public void testBookmarkCodes() {
         final String[] strings = {
                 // Observe omissions: "microsummary", "item".
                 "folder", "bookmark", "separator", "livemark", "query"
         };
         for (int i = 0; i < strings.length; ++i) {
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/HistorySessionHelperTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/HistorySessionHelperTest.java
@@ -1,23 +1,23 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.repositories.android;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.repositories.RepositorySession;
 import org.mozilla.gecko.sync.repositories.domain.HistoryRecord;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class HistorySessionHelperTest {
     @Test
     public void testShouldIgnore() throws Exception {
         final HistoryRecord aboutURL = new HistoryRecord(Utils.generateGuid(), "history", System.currentTimeMillis(), false);
 
         // And we'd ignore about:home if we downloaded it.
         assertTrue(HistorySessionHelper.shouldIgnoreStatic(aboutURL));
     }
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/VisitsHelperTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/VisitsHelperTest.java
@@ -10,24 +10,24 @@ import android.net.Uri;
 
 import junit.framework.Assert;
 
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.db.DelegatingTestContentProvider;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.db.BrowserContract;
+import org.robolectric.RobolectricTestRunner;
 import org.robolectric.shadows.ShadowContentResolver;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class VisitsHelperTest {
     @Test
     public void testBulkInsertRemoteVisits() throws Exception {
         JSONArray toInsert = new JSONArray();
         Assert.assertEquals(0, VisitsHelper.getVisitsContentValues("testGUID", toInsert).length);
 
         JSONObject visit = new JSONObject();
         Long date = Long.valueOf(123432552344l);
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/test/TestBookmarksInsertionManager.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/test/TestBookmarksInsertionManager.java
@@ -2,32 +2,32 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.repositories.android.test;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.common.log.Logger;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.repositories.android.BookmarksInsertionManager;
 import org.mozilla.gecko.sync.repositories.delegates.RepositorySessionStoreDelegate;
 import org.mozilla.gecko.sync.repositories.domain.BookmarkRecord;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestBookmarksInsertionManager {
   public BookmarksInsertionManager manager;
   public ArrayList<String[]> insertions;
 
   @Before
   public void setUp() {
     insertions = new ArrayList<String[]>();
     Set<String> writtenFolders = new HashSet<String>();
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/domain/TestClientRecord.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/domain/TestClientRecord.java
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.repositories.domain;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.Utils;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestClientRecord {
 
   @Test
   public void testEnsureDefaults() {
     // Ensure defaults.
     ClientRecord record = new ClientRecord();
     assertEquals(ClientRecord.COLLECTION_NAME, record.collection);
     assertEquals(0, record.lastModified);
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/domain/test/TestFormHistoryRecord.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/domain/test/TestFormHistoryRecord.java
@@ -1,25 +1,25 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.repositories.domain.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.repositories.domain.FormHistoryRecord;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFormHistoryRecord {
   public static FormHistoryRecord withIdFieldNameAndValue(long id, String fieldName, String value) {
     FormHistoryRecord fr = new FormHistoryRecord();
     fr.androidID = id;
     fr.fieldName = fieldName;
     fr.fieldValue = value;
 
     return fr;
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/domain/test/TestPasswordRecord.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/domain/test/TestPasswordRecord.java
@@ -1,26 +1,26 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 package org.mozilla.gecko.sync.repositories.domain.test;
 
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.repositories.domain.PasswordRecord;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 
 import java.io.IOException;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestPasswordRecord {
     @Test
     public void testInitFromPayload() {
         ExtendedJSONObject o = null;
         try {
             o = new ExtendedJSONObject("{" +
                     "\"hostname\": \"https://example.com\",\n" +
                     "\"formSubmitURL\": \"https://example.com/login\",\n" +
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/downloaders/BatchingDownloaderControllerTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/downloaders/BatchingDownloaderControllerTest.java
@@ -2,24 +2,24 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.sync.repositories.downloaders;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.InfoCollections;
 import org.mozilla.gecko.sync.InfoConfiguration;
 import org.mozilla.gecko.sync.repositories.Server15RepositorySession;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BatchingDownloaderControllerTest {
     private BatchingDownloaderTest.MockSever15Repository serverRepository;
     private Server15RepositorySession repositorySession;
     private BatchingDownloaderTest.MockSessionFetchRecordsDelegate sessionFetchRecordsDelegate;
     private BatchingDownloaderTest.MockDownloader mockDownloader;
     private BatchingDownloaderTest.CountingShadowRepositoryState repositoryStateProvider;
 
     @Before
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/downloaders/BatchingDownloaderDelegateTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/downloaders/BatchingDownloaderDelegateTest.java
@@ -5,45 +5,45 @@
 package org.mozilla.gecko.sync.repositories.downloaders;
 
 import android.net.Uri;
 import android.os.SystemClock;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CollectionConcurrentModificationException;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.HTTPFailureException;
 import org.mozilla.gecko.sync.InfoCollections;
 import org.mozilla.gecko.sync.InfoConfiguration;
 import org.mozilla.gecko.sync.net.SyncResponse;
 import org.mozilla.gecko.sync.net.SyncStorageCollectionRequest;
 import org.mozilla.gecko.sync.net.SyncStorageResponse;
 import org.mozilla.gecko.sync.repositories.NonPersistentRepositoryStateProvider;
 import org.mozilla.gecko.sync.repositories.RepositorySession;
 import org.mozilla.gecko.sync.repositories.Server15RepositorySession;
 import org.mozilla.gecko.sync.repositories.Server15Repository;
 import org.mozilla.gecko.sync.repositories.delegates.RepositorySessionFetchRecordsDelegate;
 import org.mozilla.gecko.sync.repositories.domain.Record;
+import org.robolectric.RobolectricTestRunner;
 
 import java.net.URI;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
 import ch.boye.httpclientandroidlib.ProtocolVersion;
 import ch.boye.httpclientandroidlib.client.ClientProtocolException;
 import ch.boye.httpclientandroidlib.message.BasicHttpResponse;
 import ch.boye.httpclientandroidlib.message.BasicStatusLine;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BatchingDownloaderDelegateTest {
     private Server15RepositorySession repositorySession;
     private MockDownloader mockDownloader;
     private String DEFAULT_COLLECTION_URL = "http://dummy.url/";
 
     class MockDownloader extends BatchingDownloader {
         public boolean isSuccess = false;
         public boolean isFetched = false;
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/downloaders/BatchingDownloaderTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/downloaders/BatchingDownloaderTest.java
@@ -7,17 +7,16 @@ package org.mozilla.gecko.sync.repositor
 import android.net.Uri;
 import android.os.SystemClock;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CollectionConcurrentModificationException;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.InfoCollections;
 import org.mozilla.gecko.sync.InfoConfiguration;
 import org.mozilla.gecko.sync.SyncDeadlineReachedException;
 import org.mozilla.gecko.sync.net.AuthHeaderProvider;
 import org.mozilla.gecko.sync.net.SyncResponse;
 import org.mozilla.gecko.sync.net.SyncStorageCollectionRequest;
@@ -25,16 +24,17 @@ import org.mozilla.gecko.sync.net.SyncSt
 import org.mozilla.gecko.sync.repositories.NonPersistentRepositoryStateProvider;
 import org.mozilla.gecko.sync.repositories.RepositorySession;
 import org.mozilla.gecko.sync.repositories.RepositoryStateProvider;
 import org.mozilla.gecko.sync.repositories.Server15Repository;
 import org.mozilla.gecko.sync.repositories.Server15RepositorySession;
 import org.mozilla.gecko.sync.repositories.Repository;
 import org.mozilla.gecko.sync.repositories.delegates.RepositorySessionFetchRecordsDelegate;
 import org.mozilla.gecko.sync.repositories.domain.Record;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.ExecutorService;
@@ -44,17 +44,17 @@ import java.util.concurrent.atomic.Atomi
 
 import ch.boye.httpclientandroidlib.ProtocolVersion;
 import ch.boye.httpclientandroidlib.message.BasicHttpResponse;
 import ch.boye.httpclientandroidlib.message.BasicStatusLine;
 
 import static org.junit.Assert.*;
 import static org.junit.Assert.assertEquals;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BatchingDownloaderTest {
     private MockSever15Repository serverRepository;
     private Server15RepositorySession repositorySession;
     private MockSessionFetchRecordsDelegate sessionFetchRecordsDelegate;
     private MockDownloader mockDownloader;
     private String DEFAULT_COLLECTION_NAME = "dummyCollection";
     private static String DEFAULT_COLLECTION_URL = "http://dummy.url/";
     private long DEFAULT_NEWER = 1;
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/test/TestRepositorySessionBundle.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/test/TestRepositorySessionBundle.java
@@ -1,22 +1,22 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.repositories.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.repositories.RepositorySessionBundle;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestRepositorySessionBundle {
   @Test
   public void testSetGetTimestamp() {
     RepositorySessionBundle bundle = new RepositorySessionBundle(-1);
     assertEquals(-1, bundle.getTimestamp());
 
     bundle.setTimestamp(10);
     assertEquals(10, bundle.getTimestamp());
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/BatchMetaTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/BatchMetaTest.java
@@ -1,18 +1,18 @@
 package org.mozilla.gecko.sync.repositories.uploaders;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BatchMetaTest {
     private BatchMeta batchMeta;
 
     @Before
     public void setUp() throws Exception {
         batchMeta = new BatchMeta(null, null);
     }
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/BatchingUploaderTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/BatchingUploaderTest.java
@@ -10,42 +10,42 @@ import android.support.annotation.NonNul
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.mock;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.testhelpers.MockRecord;
 import org.mozilla.gecko.background.testhelpers.NullPayloadRecord;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.InfoCollections;
 import org.mozilla.gecko.sync.InfoConfiguration;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.net.AuthHeaderProvider;
 import org.mozilla.gecko.sync.repositories.RepositorySession;
 import org.mozilla.gecko.sync.repositories.NonPersistentRepositoryStateProvider;
 import org.mozilla.gecko.sync.repositories.Server15Repository;
 import org.mozilla.gecko.sync.repositories.Server15RepositorySession;
 import org.mozilla.gecko.sync.repositories.delegates.RepositorySessionStoreDelegate;
+import org.robolectric.RobolectricTestRunner;
 
 import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Random;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class BatchingUploaderTest {
     class MockExecutorService implements ExecutorService {
         int totalPayloads = 0;
         int commitPayloads = 0;
 
         @Override
         public void execute(@NonNull Runnable command) {
             if (command instanceof PayloadDispatcher.NonPayloadContextRunnable) {
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/PayloadTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/PayloadTest.java
@@ -1,21 +1,21 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.repositories.uploaders;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class PayloadTest {
     private Payload payload;
     private long byteLimit = 1024;
     private long recordLimit = 5;
     private Object lock = new Object();
 
     @Before
     public void setUp() throws Exception {
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/PayloadUploadDelegateTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/PayloadUploadDelegateTest.java
@@ -4,26 +4,26 @@
 package org.mozilla.gecko.sync.repositories.uploaders;
 
 import android.net.Uri;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mockito;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CollectionConcurrentModificationException;
 import org.mozilla.gecko.sync.HTTPFailureException;
 import org.mozilla.gecko.sync.InfoConfiguration;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.net.AuthHeaderProvider;
 import org.mozilla.gecko.sync.net.SyncResponse;
 import org.mozilla.gecko.sync.net.SyncStorageResponse;
 import org.mozilla.gecko.sync.repositories.RepositorySession;
 import org.mozilla.gecko.sync.repositories.delegates.RepositorySessionStoreDelegate;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.mockito.Mockito.mock;
 
 import java.io.ByteArrayInputStream;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ExecutorService;
@@ -34,17 +34,17 @@ import ch.boye.httpclientandroidlib.enti
 import ch.boye.httpclientandroidlib.message.BasicHttpResponse;
 import ch.boye.httpclientandroidlib.message.BasicStatusLine;
 
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class PayloadUploadDelegateTest {
     private RepositorySession repositorySession;
     private PayloadDispatcher payloadDispatcher;
     private AuthHeaderProvider authHeaderProvider;
 
     private RepositorySessionStoreDelegate sessionStoreDelegate;
 
     class MockPayloadDispatcher extends PayloadDispatcher {
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/RecordUploadRunnableTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/RecordUploadRunnableTest.java
@@ -2,23 +2,23 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.repositories.uploaders;
 
 import android.net.Uri;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.net.URI;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class RecordUploadRunnableTest {
     @Test
     public void testBuildPostURI() throws Exception {
         URI postURI = RecordUploadRunnable.buildPostURI(
                 false, null, Uri.parse("http://example.com/"));
         assertEquals("http://example.com/?batch=true", postURI.toString());
 
         postURI = RecordUploadRunnable.buildPostURI(
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/UploaderMetaTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/uploaders/UploaderMetaTest.java
@@ -1,21 +1,21 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.repositories.uploaders;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class UploaderMetaTest {
     private UploaderMeta uploaderMeta;
     private long byteLimit = 1024;
     private long recordLimit = 5;
     private Object lock = new Object();
 
     @Before
     public void setUp() throws Exception {
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/setup/activities/WebURLFinderTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/setup/activities/WebURLFinderTest.java
@@ -1,22 +1,22 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.setup.activities;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.Arrays;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class WebURLFinderTest {
     public String find(String string) {
         return new WebURLFinder(string).bestWebURL();
     }
 
     public String find(String[] strings) {
         return new WebURLFinder(Arrays.asList(strings)).bestWebURL();
     }
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/stage/test/TestEnsureCrypto5KeysStage.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/stage/test/TestEnsureCrypto5KeysStage.java
@@ -7,41 +7,41 @@ import android.os.SystemClock;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.test.helpers.HTTPServerTestHelper;
 import org.mozilla.android.sync.test.helpers.MockGlobalSessionCallback;
 import org.mozilla.android.sync.test.helpers.MockServer;
 import org.mozilla.gecko.background.testhelpers.MockGlobalSession;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.AlreadySyncingException;
 import org.mozilla.gecko.sync.CollectionKeys;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.GlobalSession;
 import org.mozilla.gecko.sync.InfoCollections;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
 import org.mozilla.gecko.sync.stage.EnsureCrypto5KeysStage;
 import org.mozilla.gecko.sync.stage.GlobalSyncStage.Stage;
+import org.robolectric.RobolectricTestRunner;
 import org.simpleframework.http.Request;
 import org.simpleframework.http.Response;
 
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.concurrent.TimeUnit;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestEnsureCrypto5KeysStage {
   private int          TEST_PORT                = HTTPServerTestHelper.getTestPort();
   private final String TEST_CLUSTER_URL         = "http://localhost:" + TEST_PORT;
   private final String TEST_USERNAME            = "johndoe";
   private final String TEST_PASSWORD            = "password";
   private final String TEST_SYNC_KEY            = "abcdeabcdeabcdeabcdeabcdea";
 
   private final String TEST_JSON_NO_CRYPTO =
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/stage/test/TestFetchMetaGlobalStage.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/stage/test/TestFetchMetaGlobalStage.java
@@ -10,58 +10,51 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.android.sync.net.test.TestGlobalSession;
 import org.mozilla.android.sync.net.test.TestMetaGlobal;
 import org.mozilla.android.sync.test.helpers.HTTPServerTestHelper;
 import org.mozilla.android.sync.test.helpers.MockGlobalSessionCallback;
 import org.mozilla.android.sync.test.helpers.MockServer;
 import org.mozilla.gecko.background.testhelpers.MockGlobalSession;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.AlreadySyncingException;
 import org.mozilla.gecko.sync.CollectionKeys;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.GlobalSession;
-import org.mozilla.gecko.sync.HTTPFailureException;
 import org.mozilla.gecko.sync.InfoCollections;
 import org.mozilla.gecko.sync.MetaGlobal;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.SyncConfigurationException;
 import org.mozilla.gecko.sync.crypto.CryptoException;
 import org.mozilla.gecko.sync.crypto.KeyBundle;
 import org.mozilla.gecko.sync.delegates.FreshStartDelegate;
 import org.mozilla.gecko.sync.delegates.GlobalSessionCallback;
 import org.mozilla.gecko.sync.delegates.KeyUploadDelegate;
 import org.mozilla.gecko.sync.delegates.WipeServerDelegate;
 import org.mozilla.gecko.sync.net.AuthHeaderProvider;
-import org.mozilla.gecko.sync.net.SyncStorageResponse;
 import org.mozilla.gecko.sync.stage.FetchMetaGlobalStage;
 import org.mozilla.gecko.sync.stage.GlobalSyncStage.Stage;
+import org.robolectric.RobolectricTestRunner;
 import org.simpleframework.http.Request;
 import org.simpleframework.http.Response;
 
 import java.io.IOException;
 import java.net.URI;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import ch.boye.httpclientandroidlib.HttpResponse;
-import ch.boye.httpclientandroidlib.ProtocolVersion;
-import ch.boye.httpclientandroidlib.message.BasicHttpResponse;
-import ch.boye.httpclientandroidlib.message.BasicStatusLine;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestFetchMetaGlobalStage {
   @SuppressWarnings("unused")
   private static final String  LOG_TAG          = "TestMetaGlobalStage";
 
   private static final int     TEST_PORT        = HTTPServerTestHelper.getTestPort();
   private static final String  TEST_SERVER      = "http://localhost:" + TEST_PORT + "/";
   private static final String  TEST_CLUSTER_URL = TEST_SERVER + "cluster/";
   private HTTPServerTestHelper data             = new HTTPServerTestHelper();
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/stage/test/TestStageLookup.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/stage/test/TestStageLookup.java
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.stage.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.stage.GlobalSyncStage.Stage;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.HashSet;
 import java.util.Set;
 
 import static org.junit.Assert.assertEquals;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestStageLookup {
 
   @Test
   public void testStageLookupByName() {
     Set<Stage> namedStages = new HashSet<Stage>(Stage.getNamedStages());
     Set<Stage> expected = new HashSet<Stage>();
     expected.add(Stage.syncClientsEngine);
     expected.add(Stage.syncBookmarks);
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/synchronizer/StoreBatchTrackerTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/synchronizer/StoreBatchTrackerTest.java
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.synchronizer;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.synchronizer.StoreBatchTracker.Batch;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.ArrayList;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class StoreBatchTrackerTest {
     private StoreBatchTracker tracker;
 
     @Before
     public void setUp() throws Exception {
         tracker = new StoreBatchTracker();
     }
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/telemetry/TelemetryCollectorTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/telemetry/TelemetryCollectorTest.java
@@ -4,36 +4,36 @@
 package org.mozilla.gecko.sync.telemetry;
 
 import android.os.Bundle;
 
 import org.json.simple.JSONObject;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CollectionConcurrentModificationException;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.HTTPFailureException;
 import org.mozilla.gecko.sync.SyncDeadlineReachedException;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.sync.net.SyncStorageResponse;
 import org.mozilla.gecko.sync.repositories.FetchFailedException;
 import org.mozilla.gecko.sync.repositories.StoreFailedException;
 import org.mozilla.gecko.sync.repositories.domain.ClientRecord;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.ArrayList;
 import java.util.ConcurrentModificationException;
 
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.doReturn;
 
 import static org.junit.Assert.*;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TelemetryCollectorTest {
     private TelemetryCollector collector;
 
     @Before
     public void setUp() throws Exception {
         collector = new TelemetryCollector();
     }
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/telemetry/TelemetryEventCollectorTest.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/telemetry/TelemetryEventCollectorTest.java
@@ -1,21 +1,21 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.telemetry;
 
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.HashMap;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TelemetryEventCollectorTest {
 
     @Test
     public void testValidateTelemetryEvent() {
         // object arg bytes len > 20.
         Assert.assertFalse(TelemetryEventCollector.validateTelemetryEvent(repeat("c", 21), "met", null, null));
         Assert.assertFalse(TelemetryEventCollector.validateTelemetryEvent(repeat("©", 11), "met", null, null));
 
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestBookmarkValidator.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestBookmarkValidator.java
@@ -1,26 +1,26 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 package org.mozilla.gecko.sync.test;
 
 import org.json.simple.JSONArray;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.repositories.domain.BookmarkRecord;
 import org.mozilla.gecko.sync.validation.BookmarkValidationResults;
 import org.mozilla.gecko.sync.validation.BookmarkValidator;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.*;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestBookmarkValidator {
 
     private List<BookmarkRecord> getDummyRecords() {
         List<BookmarkRecord> l = new ArrayList<>();
         {
             BookmarkRecord r = new BookmarkRecord();
             r.guid = "menu";
             r.parentID = "places";
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestExtendedJSONObject.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestExtendedJSONObject.java
@@ -2,37 +2,37 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.test;
 
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.NonArrayJSONException;
 import org.mozilla.gecko.sync.NonObjectJSONException;
 import org.mozilla.gecko.sync.UnexpectedJSONException.BadRequiredFieldJSONException;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.IOException;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNotSame;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestExtendedJSONObject {
   public static String exampleJSON = "{\"modified\":1233702554.25,\"success\":[\"{GXS58IDC}12\",\"{GXS58IDC}13\",\"{GXS58IDC}15\",\"{GXS58IDC}16\",\"{GXS58IDC}18\",\"{GXS58IDC}19\"],\"failed\":{\"{GXS58IDC}11\":[\"invalid parentid\"],\"{GXS58IDC}14\":[\"invalid parentid\"],\"{GXS58IDC}17\":[\"invalid parentid\"],\"{GXS58IDC}20\":[\"invalid parentid\"]}}";
   public static String exampleIntegral = "{\"modified\":1233702554,}";
 
   @Test
   public void testFractional() throws IOException, NonObjectJSONException {
     ExtendedJSONObject o = new ExtendedJSONObject(exampleJSON);
     assertTrue(o.containsKey("modified"));
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestInfoCollections.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestInfoCollections.java
@@ -1,30 +1,30 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.test;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.InfoCollections;
 import org.mozilla.gecko.sync.InfoCounts;
 import org.mozilla.gecko.sync.Utils;
+import org.robolectric.RobolectricTestRunner;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 /**
  * Test both info/collections and info/collection_counts.
  */
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestInfoCollections {
   public static final String TEST_COLLECTIONS_JSON =
       "{\"history\":1.3319567131E9, "    +
       " \"bookmarks\":1.33195669592E9, " +
       " \"prefs\":1.33115408641E9, "     +
       " \"crypto\":1.32046063664E9, "    +
       " \"meta\":1.321E9, "              +
       " \"forms\":1.33136685374E9, "     +
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestPersistedMetaGlobal.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/test/TestPersistedMetaGlobal.java
@@ -2,34 +2,34 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 package org.mozilla.gecko.sync.test;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.testhelpers.MockSharedPreferences;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.sync.CryptoRecord;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.MetaGlobal;
 import org.mozilla.gecko.sync.NoCollectionKeysSetException;
 import org.mozilla.gecko.sync.PersistedMetaGlobal;
 import org.mozilla.gecko.sync.crypto.CryptoException;
 import org.mozilla.gecko.sync.net.AuthHeaderProvider;
 import org.mozilla.gecko.sync.net.BasicAuthHeaderProvider;
+import org.robolectric.RobolectricTestRunner;
 
 import java.util.Set;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestPersistedMetaGlobal {
   MockSharedPreferences prefs = null;
   private final String TEST_META_URL = "metaURL";
   private final String TEST_CREDENTIALS = "credentials";
 
   @Before
   public void setUp() {
     prefs = new MockSharedPreferences();
--- a/mobile/android/services/src/test/java/org/mozilla/gecko/tokenserver/test/TestTokenServerClient.java
+++ b/mobile/android/services/src/test/java/org/mozilla/gecko/tokenserver/test/TestTokenServerClient.java
@@ -13,44 +13,44 @@ import ch.boye.httpclientandroidlib.mess
 import ch.boye.httpclientandroidlib.message.BasicHttpResponse;
 import ch.boye.httpclientandroidlib.message.BasicStatusLine;
 import junit.framework.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mozilla.gecko.background.common.log.Logger;
 import org.mozilla.gecko.background.common.log.writers.StringLogWriter;
-import org.mozilla.gecko.background.testhelpers.TestRunner;
 import org.mozilla.gecko.background.testhelpers.WaitHelper;
 import org.mozilla.gecko.sync.ExtendedJSONObject;
 import org.mozilla.gecko.sync.net.AuthHeaderProvider;
 import org.mozilla.gecko.sync.net.BaseResource;
 import org.mozilla.gecko.sync.net.SyncResponse;
 import org.mozilla.gecko.tokenserver.TokenServerClient;
 import org.mozilla.gecko.tokenserver.TokenServerClient.TokenFetchResourceDelegate;
 import org.mozilla.gecko.tokenserver.TokenServerClientDelegate;
 import org.mozilla.gecko.tokenserver.TokenServerException;
 import org.mozilla.gecko.tokenserver.TokenServerException.TokenServerConditionsRequiredException;
 import org.mozilla.gecko.tokenserver.TokenServerException.TokenServerInvalidCredentialsException;
 import org.mozilla.gecko.tokenserver.TokenServerException.TokenServerMalformedRequestException;
 import org.mozilla.gecko.tokenserver.TokenServerException.TokenServerMalformedResponseException;
 import org.mozilla.gecko.tokenserver.TokenServerException.TokenServerUnknownServiceException;
 import org.mozilla.gecko.tokenserver.TokenServerToken;
+import org.robolectric.RobolectricTestRunner;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.concurrent.Executor;
 import java.util.concurrent.Executors;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@RunWith(TestRunner.class)
+@RunWith(RobolectricTestRunner.class)
 public class TestTokenServerClient {
   public static final String JSON = "application/json";
   public static final String TEXT = "text/plain";
 
   public static final String TEST_TOKEN_RESPONSE = "{\"api_endpoint\": \"https://stage-aitc1.services.mozilla.com/1.0/1659259\"," +
       "\"duration\": 300," +
       "\"id\": \"eySHORTENED\"," +
       "\"key\": \"-plSHORTENED\"," +