@Test
 public void
     onCustomEventInterstitialDismissed_whenInterstitialAdListenerIsNull_shouldNotNotifyListener()
         throws Exception {
   subject.setInterstitialAdListener(null);
   subject.onCustomEventInterstitialDismissed();
   verify(interstitialAdListener, never()).onInterstitialDismissed(eq(subject));
 }
  @Test
  public void
      onCustomEventInterstitialLoaded_whenInterstitialAdListenerIsNull_shouldNotNotifyListenerOrTrackImpression()
          throws Exception {
    subject.setInterstitialView(interstitialView);
    subject.setInterstitialAdListener(null);

    subject.onCustomEventInterstitialLoaded();

    verify(interstitialView, never()).trackImpression();
    verify(interstitialAdListener, never()).onInterstitialLoaded(eq(subject));
  }
  @Before
  public void setUp() throws Exception {
    activity = Robolectric.buildActivity(Activity.class).create().get();
    subject = new MoPubInterstitial(activity, AD_UNIT_ID_VALUE);
    interstitialAdListener = mock(MoPubInterstitial.InterstitialAdListener.class);
    subject.setInterstitialAdListener(interstitialAdListener);

    interstitialView = mock(MoPubInterstitial.MoPubInterstitialView.class);

    customEventClassName = "class name";
    serverExtras = new HashMap<String, String>();
    serverExtras.put("testExtra", "class data");

    customEventInterstitialAdapter = TestCustomEventInterstitialAdapterFactory.getSingletonMock();
    reset(customEventInterstitialAdapter);
    adViewController = TestAdViewControllerFactory.getSingletonMock();
  }
 @Test
 public void getInterstitialAdListenerTest() throws Exception {
   interstitialAdListener = mock(MoPubInterstitial.InterstitialAdListener.class);
   subject.setInterstitialAdListener(interstitialAdListener);
   assertThat(subject.getInterstitialAdListener()).isSameAs(interstitialAdListener);
 }