VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Deprecated @VisibleForTesting int getShowCloseButtonDelay() { return mShowCloseButtonDelay; } VastVideoViewController(final Context context,
            final Bundle bundle,
            final long broadcastIdentifier,
            final BaseVideoViewControllerListener baseVideoViewControllerListener); @Override boolean backButtonEnabled(); @Override void onComplete(String url, DownloadResponse downloadResponse);  }
@Test public void constructor_shouldNotChangeCloseButtonDelay() throws Exception { initializeSubject(); assertThat(subject.getShowCloseButtonDelay()).isEqualTo(DEFAULT_VIDEO_DURATION_FOR_CLOSE_BUTTON); }
@Test public void onPrepared_whenDurationIsLessThanMaxVideoDurationForCloseButton_shouldSetShowCloseButtonDelayToDuration() throws Exception { initializeSubject(); spyOnVideoView(); setVideoViewParams(0, 1000); getShadowVideoView().getOnPreparedListener().onPrepared(null); assertThat(subject.getShowCloseButtonDelay()).isEqualTo(1000); }
@Test public void onPrepared_whenDurationIsGreaterThanMaxVideoDurationForCloseButton_shouldNotSetShowCloseButtonDelay() throws Exception { initializeSubject(); spyOnVideoView(); setVideoViewParams(0, MAX_VIDEO_DURATION_FOR_CLOSE_BUTTON + 1); getShadowVideoView().getOnPreparedListener().onPrepared(null); assertThat(subject.getShowCloseButtonDelay()).isEqualTo(DEFAULT_VIDEO_DURATION_FOR_CLOSE_BUTTON); }