SaturationProcessor implements BitmapProcessor { @Override public Bitmap process(Bitmap in) { Bitmap out = Bitmap.createBitmap(in.getWidth(), in.getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(out); canvas.drawBitmap(in, 0, 0, paint); in.recycle(); return out; } SaturationProcessor(int saturation); int getSaturation(); @Override String getId(); @Override Bitmap process(Bitmap in);  }
@Test public void testReturnsNewBitmap() { Bitmap bitmap = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888); SaturationProcessor processor = new SaturationProcessor(50); Bitmap result = processor.process(bitmap); Assert.assertNotNull(result); Assert.assertNotSame(bitmap, result); }