HttpClient { public static void makeTrackingHttpRequest(final Iterable<String> urls, final Context context) { makeTrackingHttpRequest(urls, context, null); }  static AndroidHttpClient getHttpClient(); static HttpGet initializeHttpGet(final String url, final Context context); static void makeTrackingHttpRequest(final Iterable<String> urls, final Context context); static void makeTrackingHttpRequest(final Iterable<String> urls,
            final Context context,
            final MoPubEvents.Type type); static void makeTrackingHttpRequest(final String url,
            final Context context); static void makeTrackingHttpRequest(final String url,
            final Context context,
            final MoPubEvents.Type type); synchronized static String getWebViewUserAgent(String defaultUserAgent); synchronized static String getWebViewUserAgent(); synchronized static void setWebViewUserAgent(final String userAgent);  }
@Test public void makeTrackingHttpRequest_shouldMakeTrackingHttpRequestWithWebViewUserAgent() throws Exception { HttpClient.makeTrackingHttpRequest(url, context); Robolectric.getBackgroundScheduler().unPause(); Thread.sleep(500); CommonUtils.assertHttpRequestsMade(userAgent, url); }
@Test public void makeTrackingHttpRequest_withNullUrl_shouldNotMakeTrackingHttpRequest() throws Exception { HttpClient.makeTrackingHttpRequest((String) null, context); Robolectric.getBackgroundScheduler().unPause(); Thread.sleep(500); CommonUtils.assertHttpRequestsMade(null); }
@Test public void makeTrackingHttpRequest_withNullContext_shouldNotMakeTrackingHttpRequest() throws Exception { HttpClient.makeTrackingHttpRequest(url, null); Robolectric.getBackgroundScheduler().unPause(); Thread.sleep(500); CommonUtils.assertHttpRequestsMade(null); }