@Test
public void fetchAdForUrl_shouldRouteMillennialInterstitialToCustomEventHandling() throws Exception {

    AdViewController interstitialAdViewController = mock(AdViewController.class);
    MoPubInterstitial.MoPubInterstitialView moPubInterstitialView = mock(MoPubInterstitial.MoPubInterstitialView.class);
    stub(interstitialAdViewController.getMoPubView()).toReturn(moPubInterstitialView);
    stub(interstitialAdViewController.getAdConfiguration()).toReturn(mock(AdConfiguration.class));
    subject = new AdFetcher(interstitialAdViewController, "expected userAgent");
    String json = "{\"adWidth\": 320, \"adHeight\": 480, \"adUnitID\": \"44310\"}";
    response.addHeader(AD_TYPE.getKey(), "interstitial");
    response.addHeader(FULL_AD_TYPE.getKey(), "millennial_full");
    response.addHeader(NATIVE_PARAMS.getKey(), json);
    Robolectric.addPendingHttpResponse(response);
    subject.fetchAdForUrl("ignored_url");
    Map<String, String> paramsMap = new HashMap<String, String>();
    paramsMap.put(CUSTOM_EVENT_NAME.getKey(), "com.mopub.mobileads.MillennialInterstitial");
    paramsMap.put(CUSTOM_EVENT_DATA.getKey(), json);
    verify(moPubInterstitialView).loadCustomEvent(eq(paramsMap));
}