@Test public void shouldReturnMultipartHttpStackWrapper() { HttpStack httpStack = HttpStackFactory.createDefaultHttpStack(); assertThat(httpStack, is(instanceOf(MultipartHttpStackWrapper.class))); }
public static HttpStack createDefaultHttpStack() { HttpStack httpStack = null; HttpClient httpClient = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { httpStack = createHurlStack(); } else { httpClient = createAndroidHttpClient(DEFAULT_USER_AGENT); httpStack = createHttpClientStack(httpClient); } MultipartHttpStack multipartStack = new DefaultMultipartHttpStack(httpClient); HttpStack completedStack = new MultipartHttpStackWrapper(httpStack, multipartStack); return completedStack; }
HttpStackFactory { public static HttpStack createDefaultHttpStack() { HttpStack httpStack = null; HttpClient httpClient = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { httpStack = createHurlStack(); } else { httpClient = createAndroidHttpClient(DEFAULT_USER_AGENT); httpStack = createHttpClientStack(httpClient); } MultipartHttpStack multipartStack = new DefaultMultipartHttpStack(httpClient); HttpStack completedStack = new MultipartHttpStackWrapper(httpStack, multipartStack); return completedStack; } }
HttpStackFactory { public static HttpStack createDefaultHttpStack() { HttpStack httpStack = null; HttpClient httpClient = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { httpStack = createHurlStack(); } else { httpClient = createAndroidHttpClient(DEFAULT_USER_AGENT); httpStack = createHttpClientStack(httpClient); } MultipartHttpStack multipartStack = new DefaultMultipartHttpStack(httpClient); HttpStack completedStack = new MultipartHttpStackWrapper(httpStack, multipartStack); return completedStack; }  }
HttpStackFactory { public static HttpStack createDefaultHttpStack() { HttpStack httpStack = null; HttpClient httpClient = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { httpStack = createHurlStack(); } else { httpClient = createAndroidHttpClient(DEFAULT_USER_AGENT); httpStack = createHttpClientStack(httpClient); } MultipartHttpStack multipartStack = new DefaultMultipartHttpStack(httpClient); HttpStack completedStack = new MultipartHttpStackWrapper(httpStack, multipartStack); return completedStack; }  static HttpStack createDefaultHttpStack(); static HurlStack createHurlStack(); static HttpClientStack createHttpClientStack(HttpClient httpClient); }
HttpStackFactory { public static HttpStack createDefaultHttpStack() { HttpStack httpStack = null; HttpClient httpClient = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { httpStack = createHurlStack(); } else { httpClient = createAndroidHttpClient(DEFAULT_USER_AGENT); httpStack = createHttpClientStack(httpClient); } MultipartHttpStack multipartStack = new DefaultMultipartHttpStack(httpClient); HttpStack completedStack = new MultipartHttpStackWrapper(httpStack, multipartStack); return completedStack; }  static HttpStack createDefaultHttpStack(); static HurlStack createHurlStack(); static HttpClientStack createHttpClientStack(HttpClient httpClient);  }