VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Deprecated 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 onPrepared_whenDurationIsLessThanMaxVideoDurationForCloseButton_shouldSetShowCloseButtonDelayToDuration() throws Exception { initializeSubject(); stub(mediaPlayer.getDuration()).toReturn(1000); setMediaPlayer(mediaPlayer); getShadowVideoView().getOnPreparedListener().onPrepared(null); assertThat(subject.getShowCloseButtonDelay()).isEqualTo(1000); }
@Test public void onPrepared_whenDurationIsGreaterThanMaxVideoDurationForCloseButton_shouldNotSetShowCloseButtonDelay() throws Exception { initializeSubject(); stub(mediaPlayer.getDuration()).toReturn(MAX_VIDEO_DURATION_FOR_CLOSE_BUTTON + 1); setMediaPlayer(mediaPlayer); getShadowVideoView().getOnPreparedListener().onPrepared(null); assertThat(subject.getShowCloseButtonDelay()).isEqualTo(DEFAULT_VIDEO_DURATION_FOR_CLOSE_BUTTON); }
@Test public void constructor_shouldNotChangeCloseButtonDelay() throws Exception { initializeSubject(); assertThat(subject.getShowCloseButtonDelay()).isEqualTo(DEFAULT_VIDEO_DURATION_FOR_CLOSE_BUTTON); }