@Test
public void testMoveFirstCardToStack() throws Exception {

    //Give
    final List<View> viewsList = new ArrayList<>();
    doAnswer(new Answer() {
        @Override
        public Object answer(InvocationOnMock invocation) throws Throwable {
            viewsList.add((View) invocation.getArguments()[0]);
            return null;
        }
    }).when(shuffle).addView(any(View.class));
    shuffle.adapterPosition = 4;
    given(shuffleSettings.getNumberOfDisplayedCards()).willReturn(3);
    CardDraggableView draggableView1 = mockDraggableView();
    CardDraggableView draggableView2 = mockDraggableView();
    CardDraggableView draggableView3 = mockDraggableView();
    shuffle.draggableViews.addAll(Arrays.asList(draggableView1, draggableView2, draggableView3));
    //When
    shuffle.moveFirstCardToStack();
    //Then
    assertThat(shuffle.draggableViews.get(0)).isEqualTo(draggableView2);
    assertThat(shuffle.draggableViews.get(1)).isEqualTo(draggableView3);
    assertThat(shuffle.draggableViews.get(2)).isEqualTo(draggableView1);
    verify(shuffle).removeAllViews();
    assertThat(viewsList.get(0)).isEqualTo(draggableView1);
    assertThat(viewsList.get(1)).isEqualTo(draggableView3);
    assertThat(viewsList.get(2)).isEqualTo(draggableView2);
    assertThat(shuffle.adapterPosition).isEqualTo(5);
}