SectionAdapterListUpdateCallback implements ListUpdateCallback { @Override public void onChanged(final int position, final int count, @Nullable final Object payload) { sectionAdapter.notifyItemRangeChanged(position, count, payload); } 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_whenOnChanged_thenNotifyItemRangeChangedIsCalled() { final int position = 3; final int count = 9; final Object payload = new Object(); sectionAdapterListUpdateCallback.onChanged(position, count, payload); verify(sectionAdapter).notifyItemRangeChanged(position, count, payload); }