VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Deprecated void setCloseButtonVisible(boolean visible) { mShowCloseButtonEventFired = visible; } 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 onTouch_whenCloseButtonVisible_shouldPingClickThroughTrackers() throws Exception { VastVideoConfiguration vastVideoConfiguration = new VastVideoConfiguration(); vastVideoConfiguration.setDiskMediaFileUrl("disk_video_path"); vastVideoConfiguration.addClickTrackers(Arrays.asList("click_1", "click_2")); bundle.putSerializable(VAST_VIDEO_CONFIGURATION, vastVideoConfiguration); initializeSubject(); subject.setCloseButtonVisible(true); getShadowVideoView().getOnTouchListener().onTouch(null, GestureUtils.createActionUp(0, 0)); Robolectric.getUiThreadScheduler().unPause(); Robolectric.getBackgroundScheduler().unPause(); Thread.sleep(NETWORK_DELAY); assertHttpRequestsMade(expectedUserAgent, "click_1", "click_2"); }
@Test public void onTouch_whenCloseButtonNotVisible_shouldNotPingClickThroughTrackers() throws Exception { VastVideoConfiguration vastVideoConfiguration = new VastVideoConfiguration(); vastVideoConfiguration.setDiskMediaFileUrl("disk_video_path"); vastVideoConfiguration.addClickTrackers(Arrays.asList("click_1", "click_2")); bundle.putSerializable(VAST_VIDEO_CONFIGURATION, vastVideoConfiguration); initializeSubject(); subject.setCloseButtonVisible(false); getShadowVideoView().getOnTouchListener().onTouch(null, GestureUtils.createActionUp(0, 0)); Robolectric.getBackgroundScheduler().unPause(); Thread.sleep(NETWORK_DELAY); assertThat(Robolectric.httpRequestWasMade()).isFalse(); }