I wanted to use Bitmap.compress() to generate stream of different formats at first, but soon found Robolectric's mock method only return a description text.