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