@Test public void asBitmap_shouldReturnBitmap() throws Exception { String imageData = "fake_bitmap_data"; when(downloadResponse1.getByteArray()).thenReturn(imageData.getBytes()); final Bitmap bitmap = HttpResponses.asBitmap(downloadResponse1); assertThat(bitmap).isNotNull(); assertThat(bitmap).isInstanceOf(Bitmap.class); assertThat(shadowOf(bitmap).getCreatedFromBytes()).isEqualTo(imageData.getBytes()); }
public static Bitmap asBitmap(final DownloadResponse downloadResponse) { if (downloadResponse == null) { return null; } final byte[] bytes = downloadResponse.getByteArray(); return decodeByteArray(bytes, 0, bytes.length); }
HttpResponses { public static Bitmap asBitmap(final DownloadResponse downloadResponse) { if (downloadResponse == null) { return null; } final byte[] bytes = downloadResponse.getByteArray(); return decodeByteArray(bytes, 0, bytes.length); } }
HttpResponses { public static Bitmap asBitmap(final DownloadResponse downloadResponse) { if (downloadResponse == null) { return null; } final byte[] bytes = downloadResponse.getByteArray(); return decodeByteArray(bytes, 0, bytes.length); } private  HttpResponses(); }
HttpResponses { public static Bitmap asBitmap(final DownloadResponse downloadResponse) { if (downloadResponse == null) { return null; } final byte[] bytes = downloadResponse.getByteArray(); return decodeByteArray(bytes, 0, bytes.length); } private  HttpResponses(); static Bitmap asBitmap(final DownloadResponse downloadResponse); static JSONObject asJsonObject(final DownloadResponse downloadResponse); static String asResponseString(final DownloadResponse downloadResponse); }
HttpResponses { public static Bitmap asBitmap(final DownloadResponse downloadResponse) { if (downloadResponse == null) { return null; } final byte[] bytes = downloadResponse.getByteArray(); return decodeByteArray(bytes, 0, bytes.length); } private  HttpResponses(); static Bitmap asBitmap(final DownloadResponse downloadResponse); static JSONObject asJsonObject(final DownloadResponse downloadResponse); static String asResponseString(final DownloadResponse downloadResponse);  }