SectionAdapterListUpdateCallback implements ListUpdateCallback { @Override public void onRemoved(final int position, final int count) { sectionAdapter.notifyItemRangeRemoved(position, count); } 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_whenOnRemoved_thenNotifyItemRangeRemovedIsCalled() { final int position = 3; final int count = 9; sectionAdapterListUpdateCallback.onRemoved(position, count); verify(sectionAdapter).notifyItemRangeRemoved(position, count); }