### Question:
WearTouchMediator implements
            AmbientConfig.Listener,
            PowerTracker.Listener,
            TimeOnlyMode.Listener { public void onBootCompleted() { mUserAbsentTouchOff.register(); mUserAbsentTouchOffEnabled = mUserAbsentTouchOff.isEnabled(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(Intent.ACTION_SCREEN_ON); intentFilter.addAction(Intent.ACTION_SCREEN_OFF); intentFilter.addAction(Home.ACTION_ENABLE_TOUCH); intentFilter.addAction(Home.ACTION_DISABLE_TOUCH); intentFilter.addAction(WetMode.ACTION_WET_MODE_STARTED); intentFilter.addAction(WetMode.ACTION_WET_MODE_ENDED); mContext.registerReceiver(receiver, intentFilter); updateState("onBootCompleted"); } WearTouchMediator(
            Context context,
            AmbientConfig ambientConfig,
            PowerTracker powerTracker,
            TimeOnlyMode timeOnlyMode,
            BooleanFlag userAbsentTouchOffObserver); @VisibleForTesting  WearTouchMediator(
            Context context,
            AmbientConfig ambientConfig,
            PowerTracker powerTracker,
            TimeOnlyMode timeOnlyMode,
            TouchInputProvider touchInputProvider,
            BooleanFlag userAbsentTouchOffObserver); void onBootCompleted(); @Override void onDeviceIdleModeChanged(); @Override void onAmbientConfigChanged(); @Override void onTimeOnlyModeChanged(boolean timeOnlyMode); void onUserAbsentTouchOffChanged(boolean enabled); void onInteractiveStateChanged(boolean interactive); void onHomeTouchChanged(boolean enabled); void onTouchLockChanged(boolean enabled); void dump(IndentingPrintWriter ipw);  }### Answer:
@Test public void testOnBootCompleted() { mMediator.onBootCompleted(); verify(mockAmbientConfig).addListener(mMediator); verify(mockTimeOnlyMode).addListener(mMediator); verify(mockPowerTracker).addListener(mMediator); assertThat(ShadowApplication.getInstance().hasReceiverForIntent( new Intent(Intent.ACTION_SCREEN_ON))) .isTrue(); assertThat(ShadowApplication.getInstance().hasReceiverForIntent( new Intent(Intent.ACTION_SCREEN_OFF))) .isTrue(); assertThat(ShadowApplication.getInstance().hasReceiverForIntent( new Intent(Home.ACTION_ENABLE_TOUCH))) .isTrue(); assertThat(ShadowApplication.getInstance().hasReceiverForIntent( new Intent(Home.ACTION_DISABLE_TOUCH))) .isTrue(); assertThat(ShadowApplication.getInstance().hasReceiverForIntent( new Intent(WetMode.ACTION_WET_MODE_STARTED))) .isTrue(); assertThat(ShadowApplication.getInstance().hasReceiverForIntent( new Intent(WetMode.ACTION_WET_MODE_ENDED))) .isTrue(); verify(mockInputDevice).enable(); }