SectionAdapterListUpdateCallback implements ListUpdateCallback { @Override public void onMoved(final int fromPosition, final int toPosition) { sectionAdapter.notifyItemMoved(fromPosition, toPosition); } SectionAdapterListUpdateCallback(final SectionAdapter sectionAdapter); @Override void onInserted(final int position, final int count); @Override void onRemoved(final int position, final int count); @Override void onMoved(final int fromPosition, final int toPosition); @Override void onChanged(final int position, final int count, @Nullable final Object payload);  }
@Test public void givenSectionAdapter_whenOnMoved_thenNotifyItemMovedIsCalled() { final int fromPosition = 3; final int toPosition = 9; sectionAdapterListUpdateCallback.onMoved(fromPosition, toPosition); verify(sectionAdapter).notifyItemMoved(fromPosition, toPosition); }