@Test public void run_whenShouldNotShowCountdown_shouldNotCallUpdateCountdown() { when(mockVideoViewController.shouldShowCountdown()).thenReturn(false); subject.doWork(); verify(mockVideoViewController, never()).updateCountdown(); verify(mockVideoViewController).updateDuration(); }
@Override public void doWork() { if (mVideoViewController.shouldShowCountdown()) { mVideoViewController.updateCountdown(); } if (mVideoViewController.shouldBeInteractable()) { mVideoViewController.makeVideoInteractable(); } mVideoViewController.updateDuration(); }
VastVideoViewCountdownRunnable extends RepeatingHandlerRunnable { @Override public void doWork() { if (mVideoViewController.shouldShowCountdown()) { mVideoViewController.updateCountdown(); } if (mVideoViewController.shouldBeInteractable()) { mVideoViewController.makeVideoInteractable(); } mVideoViewController.updateDuration(); } }
VastVideoViewCountdownRunnable extends RepeatingHandlerRunnable { @Override public void doWork() { if (mVideoViewController.shouldShowCountdown()) { mVideoViewController.updateCountdown(); } if (mVideoViewController.shouldBeInteractable()) { mVideoViewController.makeVideoInteractable(); } mVideoViewController.updateDuration(); } VastVideoViewCountdownRunnable(@NonNull VastVideoViewController videoViewController,
            @NonNull Handler handler); }
VastVideoViewCountdownRunnable extends RepeatingHandlerRunnable { @Override public void doWork() { if (mVideoViewController.shouldShowCountdown()) { mVideoViewController.updateCountdown(); } if (mVideoViewController.shouldBeInteractable()) { mVideoViewController.makeVideoInteractable(); } mVideoViewController.updateDuration(); } VastVideoViewCountdownRunnable(@NonNull VastVideoViewController videoViewController,
            @NonNull Handler handler); @Override void doWork(); }
VastVideoViewCountdownRunnable extends RepeatingHandlerRunnable { @Override public void doWork() { if (mVideoViewController.shouldShowCountdown()) { mVideoViewController.updateCountdown(); } if (mVideoViewController.shouldBeInteractable()) { mVideoViewController.makeVideoInteractable(); } mVideoViewController.updateDuration(); } VastVideoViewCountdownRunnable(@NonNull VastVideoViewController videoViewController,
            @NonNull Handler handler); @Override void doWork();  }