AdViewController { void loadFailUrl(MoPubErrorCode errorCode) { mIsLoading = false; Log.v("MoPub", "MoPubErrorCode: " + (errorCode == null ? "" : errorCode.toString())); final String failUrl = mAdResponse == null ? "" : mAdResponse.getFailoverUrl(); if (!TextUtils.isEmpty(failUrl)) { MoPubLog.d("Loading failover url: " + failUrl); loadNonJavascript(failUrl); } else { adDidFail(MoPubErrorCode.NO_FILL); } } AdViewController(@NonNull Context context, @NonNull MoPubView view); static void setShouldHonorServerDimensions(View view); @Nullable MoPubView getMoPubView(); void loadAd(); void reload(); String getKeywords(); void setKeywords(String keywords); Location getLocation(); void setLocation(Location location); String getAdUnitId(); void setAdUnitId(@NonNull String adUnitId); long getBroadcastIdentifier(); void setTimeout(int milliseconds); int getAdWidth(); int getAdHeight(); @Deprecated String getClickTrackingUrl(); @Deprecated String getRedirectUrl(); @Deprecated String getResponseString(); boolean getAutorefreshEnabled(); @Nullable AdReport getAdReport(); boolean getTesting(); void setTesting(boolean enabled); @Deprecated void customEventDidLoadAd(); @Deprecated void customEventDidFailToLoadAd(); @Deprecated void customEventActionWillBegin(); @Deprecated void setClickthroughUrl(String clickthroughUrl); @Deprecated boolean isFacebookSupported(); @Deprecated void setFacebookSupported(boolean enabled);  }
@Test public void loadFailUrl_shouldAcceptNullErrorCode() throws Exception { subject.loadFailUrl(null); }
@Test public void loadFailUrl_whenFailUrlIsNull_shouldCallAdDidFail() throws Exception { response.toBuilder().setFailoverUrl(null).build(); subject.loadFailUrl(MoPubErrorCode.INTERNAL_ERROR); verify(mockMoPubView).adFailed(eq(MoPubErrorCode.NO_FILL)); verifyZeroInteractions(mockRequestQueue); }