diff --git a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
index b6cfcd0..ae41e74 100644
--- a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
@@ -33,6 +33,7 @@
 
 import com.android.inputmethod.latin.utils.StringUtils;
 
+import java.io.File;
 import java.util.List;
 import java.util.Locale;
 
@@ -83,6 +84,11 @@
         loadDictionary();
     }
 
+    // Dummy constructor for tests.
+    public ContactsBinaryDictionary(final Context context, final Locale locale, final File file) {
+        this(context, locale);
+    }
+
     private synchronized void registerObserver(final Context context) {
         // Perform a managed query. The Activity will handle closing and requerying the cursor
         // when needed.
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
index 9f5cd16..7afd657 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
@@ -17,7 +17,6 @@
 package com.android.inputmethod.latin;
 
 import android.content.Context;
-import android.os.SystemClock;
 import android.util.Log;
 
 import com.android.inputmethod.annotations.UsedForTesting;
@@ -181,6 +180,19 @@
         return executor;
     }
 
+    /**
+     * Shutdowns all executors and removes all executors from the executor map for testing.
+     */
+    @UsedForTesting
+    public static void shutdownAllExecutors() {
+        synchronized(sDictNameExecutorMap) {
+            for (final PrioritizedSerialExecutor executor : sDictNameExecutorMap.values()) {
+                executor.shutdown();
+                sDictNameExecutorMap.remove(executor);
+            }
+        }
+    }
+
     private static AbstractDictionaryWriter getDictionaryWriter(final Context context,
             final boolean isDynamicPersonalizationDictionary) {
         if (isDynamicPersonalizationDictionary) {
@@ -504,7 +516,7 @@
      * dictionary exists, this method will generate one.
      */
     protected void loadDictionary() {
-        mPerInstanceDictionaryUpdateController.mLastUpdateRequestTime = SystemClock.uptimeMillis();
+        mPerInstanceDictionaryUpdateController.mLastUpdateRequestTime = System.currentTimeMillis();
         reloadDictionaryIfRequired();
     }
 
@@ -600,7 +612,7 @@
      *        the current binary dictionary from file.
      */
     protected void setRequiresReload(final boolean requiresRebuild) {
-        final long time = SystemClock.uptimeMillis();
+        final long time = System.currentTimeMillis();
         mPerInstanceDictionaryUpdateController.mLastUpdateRequestTime = time;
         mDictNameDictionaryUpdateController.mLastUpdateRequestTime = time;
         if (DEBUG) {
@@ -648,7 +660,7 @@
             @Override
             public void run() {
                 try {
-                    final long time = SystemClock.uptimeMillis();
+                    final long time = System.currentTimeMillis();
                     final boolean dictionaryFileExists = dictionaryFileExists();
                     if (mDictNameDictionaryUpdateController.isOutOfDate()
                             || !dictionaryFileExists) {
diff --git a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
index 1dc3c54..6fc9822 100644
--- a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
@@ -32,6 +32,7 @@
 import com.android.inputmethod.latin.utils.LocaleUtils;
 import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
 
+import java.io.File;
 import java.util.Arrays;
 import java.util.Locale;
 
@@ -78,6 +79,11 @@
         this(context, locale, false);
     }
 
+    // Dummy constructor for tests.
+    public UserBinaryDictionary(final Context context, final Locale locale, final File file) {
+        this(context, locale);
+    }
+
     public UserBinaryDictionary(final Context context, final Locale locale,
             final boolean alsoUseMoreRestrictiveLocales) {
         super(context, getDictNameWithLocale(NAME, locale), locale, Dictionary.TYPE_USER,
diff --git a/java/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutor.java b/java/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutor.java
index 201a70d..b10d08a 100644
--- a/java/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutor.java
+++ b/java/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutor.java
@@ -137,6 +137,7 @@
     public void shutdown() {
         synchronized(mLock) {
             mIsShutdown = true;
+            mThreadPoolExecutor.shutdown();
         }
     }
 
