private void assertShowsCustomEventInterstitial(boolean shouldBeReady) { MoPubInterstitial.MoPubInterstitialView moPubInterstitialView = subject.new MoPubInterstitialView(activity); moPubInterstitialView.loadCustomEvent(customEventClassName, serverExtras); assertThat(subject.isReady()).isEqualTo(shouldBeReady); assertThat(subject.show()).isEqualTo(shouldBeReady); if (shouldBeReady) { verify(customEventInterstitialAdapter).showInterstitial(); } else { verify(customEventInterstitialAdapter, never()).showInterstitial(); } }