diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index 6919afa..661cf25 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -224,6 +224,7 @@
                 new ConnectionServiceRepository(mPhoneAccountRegistrar, mContext, mLock, this);
         mInCallWakeLockController = inCallWakeLockControllerFactory.create(context, this);
 
+        mListeners.add(mInCallWakeLockController);
         mListeners.add(statusBarNotifier);
         mListeners.add(mCallLogManager);
         mListeners.add(mPhoneStateBroadcaster);
diff --git a/src/com/android/server/telecom/InCallWakeLockController.java b/src/com/android/server/telecom/InCallWakeLockController.java
index a6c63c3..8abacd9 100644
--- a/src/com/android/server/telecom/InCallWakeLockController.java
+++ b/src/com/android/server/telecom/InCallWakeLockController.java
@@ -41,8 +41,6 @@
         PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
         mFullWakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, TAG);
         mFullWakeLock.setReferenceCounted(false);
-
-        callsManager.addListener(this);
     }
 
     @Override
diff --git a/src/com/android/server/telecom/TelecomSystem.java b/src/com/android/server/telecom/TelecomSystem.java
index e7acf52..8e017d6 100644
--- a/src/com/android/server/telecom/TelecomSystem.java
+++ b/src/com/android/server/telecom/TelecomSystem.java
@@ -128,7 +128,6 @@
         BluetoothManager bluetoothManager = new BluetoothManager(mContext);
         WiredHeadsetManager wiredHeadsetManager = new WiredHeadsetManager(mContext);
 
-
         mCallsManager = new CallsManager(
                 mContext,
                 mLock,
diff --git a/tests/Android.mk b/tests/Android.mk
index a802768..317bfe3 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -39,6 +39,9 @@
     --auto-add-overlay \
     --extra-packages com.android.server.telecom
 
+LOCAL_JACK_ENABLED := disabled
+LOCAL_PROGUARD_ENABLED := disabled
+
 LOCAL_PACKAGE_NAME := TelecomUnitTests
 LOCAL_CERTIFICATE := platform
 
diff --git a/tests/src/com/android/server/telecom/tests/MockitoHelper.java b/tests/src/com/android/server/telecom/tests/MockitoHelper.java
index 5193bba..3425b0e 100644
--- a/tests/src/com/android/server/telecom/tests/MockitoHelper.java
+++ b/tests/src/com/android/server/telecom/tests/MockitoHelper.java
@@ -18,9 +18,7 @@
 
 import com.android.server.telecom.Log;
 
-import android.annotation.TargetApi;
 import android.content.Context;
-import android.os.Looper;
 
 /**
  * Helper for Mockito-based test cases.
@@ -28,10 +26,6 @@
 public final class MockitoHelper {
     private static final String DEXCACHE = "dexmaker.dexcache";
 
-    private Thread mRequestThread;
-    private ClassLoader mRequestThreadOriginalClassLoader;
-    private ClassLoader mMainThreadOriginalClassLoader;
-
     /**
      * Creates a new helper, which in turn will set the context classloader so
      * it can load Mockito resources.
@@ -39,24 +33,6 @@
      * @param packageClass test case class
      */
     public void setUp(Context context, Class<?> packageClass) throws Exception {
-        // makes a copy of the context classloader
-        mRequestThread = Thread.currentThread();
-        mRequestThreadOriginalClassLoader = mRequestThread.getContextClassLoader();
-        mMainThreadOriginalClassLoader = Looper.getMainLooper().getThread().getContextClassLoader();
-
-        ClassLoader newClassLoader = packageClass.getClassLoader();
-
-        Log.v(this, "Changing context classloader for thread %s from %s to %s",
-                mRequestThread.getName(),
-                mRequestThreadOriginalClassLoader,
-                newClassLoader);
-        mRequestThread.setContextClassLoader(newClassLoader);
-
-        Log.v(this, "Changing context classloader for MAIN thread from %s to %s",
-                mMainThreadOriginalClassLoader,
-                newClassLoader);
-        Looper.getMainLooper().getThread().setContextClassLoader(newClassLoader);
-
         String dexCache = context.getCacheDir().toString();
         Log.v(this, "Setting property %s to %s", DEXCACHE, dexCache);
         System.setProperty(DEXCACHE, dexCache);
@@ -67,7 +43,6 @@
      */
     public void tearDown() throws Exception {
         Log.v(this, "Restoring context classloaders");
-        mRequestThread.setContextClassLoader(mRequestThreadOriginalClassLoader);
         Log.v(this, "Clearing property %s", DEXCACHE);
         System.clearProperty(DEXCACHE);
     }
diff --git a/tests/src/com/android/server/telecom/tests/TelecomSystemTest.java b/tests/src/com/android/server/telecom/tests/TelecomSystemTest.java
index f3f4e5b..8810645 100644
--- a/tests/src/com/android/server/telecom/tests/TelecomSystemTest.java
+++ b/tests/src/com/android/server/telecom/tests/TelecomSystemTest.java
@@ -26,9 +26,9 @@
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.timeout;
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
 
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
@@ -56,7 +56,10 @@
 import com.android.server.telecom.BluetoothPhoneServiceImpl;
 import com.android.server.telecom.CallAudioManager;
 import com.android.server.telecom.CallIntentProcessor;
+import com.android.server.telecom.CallerInfoAsyncQueryFactory;
 import com.android.server.telecom.CallsManager;
+import com.android.server.telecom.CallsManagerListenerBase;
+import com.android.server.telecom.ContactsAsyncHelper;
 import com.android.server.telecom.HeadsetMediaButton;
 import com.android.server.telecom.HeadsetMediaButtonFactory;
 import com.android.server.telecom.InCallWakeLockController;
@@ -85,7 +88,49 @@
     static final int TEST_POLL_INTERVAL = 10;  // milliseconds
     static final int TEST_TIMEOUT = 1000;  // milliseconds
 
-    @Mock MissedCallNotifier mMissedCallNotifier;
+    public class HeadsetMediaButtonFactoryF implements HeadsetMediaButtonFactory  {
+        @Override
+        public HeadsetMediaButton create(Context context, CallsManager callsManager,
+                TelecomSystem.SyncRoot lock) {
+            return mHeadsetMediaButton;
+        }
+    }
+
+    public class ProximitySensorManagerFactoryF implements ProximitySensorManagerFactory {
+        @Override
+        public ProximitySensorManager create(Context context, CallsManager callsManager) {
+            return mProximitySensorManager;
+        }
+    }
+
+    public class InCallWakeLockControllerFactoryF implements InCallWakeLockControllerFactory {
+        @Override
+        public InCallWakeLockController create(Context context, CallsManager callsManager) {
+            return mInCallWakeLockController;
+        }
+    }
+
+    public static class MissedCallNotifierFakeImpl extends CallsManagerListenerBase
+            implements MissedCallNotifier {
+        @Override
+        public void clearMissedCalls() {
+
+        }
+
+        @Override
+        public void showMissedCallNotification(com.android.server.telecom.Call call) {
+
+        }
+
+        @Override
+        public void updateOnStartup(TelecomSystem.SyncRoot lock, CallsManager callsManager,
+                ContactsAsyncHelper contactsAsyncHelper,
+                CallerInfoAsyncQueryFactory callerInfoAsyncQueryFactory) {
+
+        }
+    }
+
+    MissedCallNotifier mMissedCallNotifier = new MissedCallNotifierFakeImpl();
     @Mock HeadsetMediaButton mHeadsetMediaButton;
     @Mock ProximitySensorManager mProximitySensorManager;
     @Mock InCallWakeLockController mInCallWakeLockController;
@@ -188,30 +233,17 @@
     }
 
     private void setupTelecomSystem() throws Exception {
+        // Use actual implementations instead of mocking the interface out.
         HeadsetMediaButtonFactory headsetMediaButtonFactory =
-                mock(HeadsetMediaButtonFactory.class);
+                spy(new HeadsetMediaButtonFactoryF());
         ProximitySensorManagerFactory proximitySensorManagerFactory =
-                mock(ProximitySensorManagerFactory.class);
+                spy(new ProximitySensorManagerFactoryF());
         InCallWakeLockControllerFactory inCallWakeLockControllerFactory =
-                mock(InCallWakeLockControllerFactory.class);
+                spy(new InCallWakeLockControllerFactoryF());
         mAudioService = setupAudioService();
 
         mCallerInfoAsyncQueryFactoryFixture = new CallerInfoAsyncQueryFactoryFixture();
 
-        when(headsetMediaButtonFactory.create(
-                any(Context.class),
-                any(CallsManager.class),
-                any(TelecomSystem.SyncRoot.class)))
-                .thenReturn(mHeadsetMediaButton);
-        when(proximitySensorManagerFactory.create(
-                any(Context.class),
-                any(CallsManager.class)))
-                .thenReturn(mProximitySensorManager);
-        when(inCallWakeLockControllerFactory.create(
-                any(Context.class),
-                any(CallsManager.class)))
-                .thenReturn(mInCallWakeLockController);
-
         mTelecomSystem = new TelecomSystem(
                 mComponentContextFixture.getTestDouble(),
                 mMissedCallNotifier,
@@ -296,6 +328,7 @@
      */
     private IAudioService setupAudioService() {
         IAudioService audioService = mock(IAudioService.class);
+
         final AudioManager fakeAudioManager =
                 (AudioManager) mComponentContextFixture.getTestDouble()
                         .getApplicationContext().getSystemService(Context.AUDIO_SERVICE);
