AdViewController { public void loadAd() { mAdWasLoaded = true; if (mAdConfiguration.getAdUnitId() == null) { MoPubLog.d("Can't load an ad in this ad view because the ad unit ID is null. " + "Did you forget to call setAdUnitId()?"); return; } if (!isNetworkAvailable()) { MoPubLog.d("Can't load an ad because there is no network connectivity."); scheduleRefreshTimerIfEnabled(); return; } GpsHelper.fetchAdvertisingInfoAsync(mContext, mGpsHelperListener); } AdViewController(Context context, MoPubView view); static void setShouldHonorServerDimensions(View view); MoPubView getMoPubView(); void loadAd(); void reload(); String getKeywords(); void setKeywords(String keywords); Location getLocation(); void setLocation(Location location); String getAdUnitId(); void setAdUnitId(String adUnitId); void setTimeout(int milliseconds); int getAdWidth(); int getAdHeight(); String getClickthroughUrl(); String getRedirectUrl(); String getResponseString(); boolean getAutorefreshEnabled(); 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 loadAd_shouldNotLoadUrlIfAdUnitIdIsNull() throws Exception { FakeHttpLayer fakeHttpLayer = Robolectric.getFakeHttpLayer(); subject.loadAd(); assertThat(fakeHttpLayer.getLastSentHttpRequestInfo()).isNull(); }