AdViewController { String generateAdUrl() { return mUrlGenerator .withAdUnitId(mAdConfiguration.getAdUnitId()) .withKeywords(mKeywords) .withLocation(mLocation) .generateUrlString(Constants.HOST); } 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 generateAdUrl_shouldIncludeMinFields() throws Exception { String expectedAdUrl = "http: "?v=6" + "&nv=" + MoPub.SDK_VERSION + "&dn=" + Build.MANUFACTURER + "%2C" + Build.MODEL + "%2C" + Build.PRODUCT + "&udid=sha%3A" + "&z=-0700" + "&o=u" + "&sc_a=1.0" + "&mr=1" + "&ct=3" + "&av=1.0" + "&android_perms_ext_storage=0"; String adUrl = subject.generateAdUrl(); assertThat(adUrl).isEqualTo(expectedAdUrl); }