GalleryImageView extends FrameLayout implements Target { public void setSwipeToDismissCallback(SwipeToDismissTouchListener.Callback callback) { final View.OnTouchListener listener = SwipeToDismissTouchListener.createFromView(imageView, callback); imageView.setOnTouchListener(listener); } GalleryImageView(Context context);   GalleryImageView(Context context, MultiTouchImageView imageView, ProgressBar progressBar); void setSwipeToDismissCallback(SwipeToDismissTouchListener.Callback callback); @Override void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from); @Override void onBitmapFailed(Drawable errorDrawable); @Override void onPrepareLoad(Drawable placeHolderDrawable);  }
@Test public void testSetSwipeToDismissCallback() { subject.setSwipeToDismissCallback(callback); verify(subject.imageView).setOnTouchListener(any(View.OnTouchListener.class)); }