@Test
public void importUriScalesDownSizes() throws Exception {

    final Uri uri = Uri.fromFile(destination);
    configureUriForStream(uri, SAMPLE_JPG_BIG);
    when(preferences.get(UserPreference.Camera.AutomaticallyRotateImages)).thenReturn(false);
    when(storageManager.writeBitmap(any(Uri.class), bitmapCaptor.capture(), eq(Bitmap.CompressFormat.JPEG), eq(ImageImportProcessor.COMPRESSION_QUALITY))).thenReturn(true);
    importProcessor.process(uri)
            .test()
            .assertValue(destination)
            .assertComplete();
    // Note: we only scale down til one dimension is < 1024
    final Bitmap bitmap = bitmapCaptor.getValue();
    assertNotNull(bitmap);
    assertEquals(1100, bitmap.getWidth());
    assertEquals(800, bitmap.getHeight());
}