LegofyPicassoTransformation implements Transformation { @Override public Bitmap transform(Bitmap source) { Bitmap legofiedBitmap = Legofy.with(applicationContext).convert(source); source.recycle(); return legofiedBitmap; } LegofyPicassoTransformation(Context context); @Override Bitmap transform(Bitmap source); @Override String key(); static final String LEGOFY; }
@Test(expected = RuntimeException.class) public void shouldLegofyBitmap() throws Exception { Bitmap mockBitmap = mock(Bitmap.class); legofyPicassoTransformation.transform(mockBitmap); }