@Test public void onInvalidate_shouldDisconnectListenerToBroadcastReceiver() throws Exception { subject.loadInterstitial(context, customEventInterstitialListener, localExtras, serverExtras); subject.onInvalidate(); Intent intent; intent = new Intent(ACTION_INTERSTITIAL_SHOW); ShadowLocalBroadcastManager.getInstance(context).sendBroadcast(intent); verify(customEventInterstitialListener, never()).onInterstitialShown(); intent = new Intent(ACTION_INTERSTITIAL_DISMISS); ShadowLocalBroadcastManager.getInstance(context).sendBroadcast(intent); verify(customEventInterstitialListener, never()).onInterstitialDismissed(); }
@Override public void onInvalidate() { if (mVastManager != null) { mVastManager.cancel(); } super.onInvalidate(); }
VastVideoInterstitial extends ResponseBodyInterstitial implements VastManager.VastManagerListener { @Override public void onInvalidate() { if (mVastManager != null) { mVastManager.cancel(); } super.onInvalidate(); } }
VastVideoInterstitial extends ResponseBodyInterstitial implements VastManager.VastManagerListener { @Override public void onInvalidate() { if (mVastManager != null) { mVastManager.cancel(); } super.onInvalidate(); }  }
VastVideoInterstitial extends ResponseBodyInterstitial implements VastManager.VastManagerListener { @Override public void onInvalidate() { if (mVastManager != null) { mVastManager.cancel(); } super.onInvalidate(); }  @Override void showInterstitial(); @Override void onInvalidate(); @Override void onVastVideoConfigurationPrepared(final VastVideoConfiguration vastVideoConfiguration); }
VastVideoInterstitial extends ResponseBodyInterstitial implements VastManager.VastManagerListener { @Override public void onInvalidate() { if (mVastManager != null) { mVastManager.cancel(); } super.onInvalidate(); }  @Override void showInterstitial(); @Override void onInvalidate(); @Override void onVastVideoConfigurationPrepared(final VastVideoConfiguration vastVideoConfiguration);  }