### Question:
WearTouchMediator implements
            AmbientConfig.Listener,
            PowerTracker.Listener,
            TimeOnlyMode.Listener { @Override public void onDeviceIdleModeChanged() { updateState("onDeviceIdleModeChanged()"); } 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 testDoze_flagEnabled() { doBootCompleted(); when(mockPowerTracker.isDeviceIdle()).thenReturn(true); mMediator.onDeviceIdleModeChanged(); verify(mockInputDevice).disable(); verifyNoOtherEnable(WearTouchMediator.Reason.OFF_DOZE); when(mockPowerTracker.isDeviceIdle()).thenReturn(false); mMediator.onDeviceIdleModeChanged(); verify(mockInputDevice).enable(); }