MraidActivity extends BaseInterstitialActivity { @Override protected void onDestroy() { if (mMraidController != null) { mMraidController.destroy(); } broadcastAction(this, getBroadcastIdentifier(), ACTION_INTERSTITIAL_DISMISS); super.onDestroy(); }  static void preRenderHtml(@NonNull final Context context,
            @NonNull final CustomEventInterstitialListener customEventInterstitialListener,
            @NonNull final String htmlData); static void start(@NonNull Context context, @NonNull String htmlData,
            @NonNull AdConfiguration adConfiguration); @Override View getAdView(); @Override void onCreate(@Nullable Bundle savedInstanceState); @VisibleForTesting void setDebugListener(@Nullable MraidWebViewDebugListener debugListener);  }
@Ignore("Mraid 2.0") @Test public void onDestroy_DestroyMraidView() throws Exception { Intent expectedIntent = getIntentForActionAndIdentifier(ACTION_INTERSTITIAL_DISMISS, subject.getBroadcastIdentifier()); ShadowLocalBroadcastManager.getInstance(subject).registerReceiver(broadcastReceiver, getHtmlInterstitialIntentFilter()); subject.onDestroy(); verify(broadcastReceiver).onReceive(any(Context.class), eq(expectedIntent)); verify(mraidWebView).destroy(); assertThat(getContentView().getChildCount()).isEqualTo(0); }
@Ignore("Mraid 2.0") @Test public void onDestroy_shouldBroadcastInterstitialDismiss() throws Exception { Intent expectedIntent = getIntentForActionAndIdentifier(ACTION_INTERSTITIAL_DISMISS, testBroadcastIdentifier); ShadowLocalBroadcastManager.getInstance(subject).registerReceiver(broadcastReceiver, getHtmlInterstitialIntentFilter()); subject.onDestroy(); verify(broadcastReceiver).onReceive(any(Context.class), eq(expectedIntent)); }