Shuffle extends FrameLayout { public void swipeLeft(int duration) { if (viewAnimator != null && currentDraggableView != null) { viewAnimator.animateExit(currentDraggableView, Direction.LEFT, duration); } } Shuffle(Context context);  Shuffle(Context context, AttributeSet attrs);  Shuffle(Context context, AttributeSet attrs, int defStyleAttr); ShuffleSettings getShuffleSettings(); @Nullable Adapter getShuffleAdapter(); void setShuffleAdapter(@Nullable Adapter shuffleAdapter); void addListener(Listener listener); void removeListener(Listener listener); ShuffleViewAnimator getViewAnimator(); void setViewAnimator(ShuffleViewAnimator viewAnimator); void swipeRight(int duration); void swipeLeft(int duration); int getCurrentAdapterPosition(); CardDraggableView getDraggableView(int position); CardDraggableView getLastDraggableView(); CardDraggableView getFirstDraggableView(); void enable(boolean enable); void restartShuffling(); void revert(int duration);  }
@Test public void testSwipeLeft() throws Exception { shuffle.currentDraggableView = mock(CardDraggableView.class); shuffle.swipeLeft(1000); verify(viewAnimator).animateExit(any(CardDraggableView.class), eq(Direction.LEFT), eq(1000)); }