class DynamicRecyclerViewAdapter extends RecyclerView.Adapter {

    @Override
    public final int getItemCount() {
        return sectionedItemList.size();
    }

}

class DynamicRecyclerViewAdapterTest {

     DynamicRecyclerViewAdapter dynamicRecyclerViewAdapter;
    private static final String FIRST_ITEM;
    private static final String FIRST_ITEM_SECTION_TITLE;
    private final static String SECOND_ITEM;
    private static final String SECOND_ITEM_SECTION_TITLE;
    private List<String> testItems;
    @Captor ArgumentCaptor<String> titleCaptor;
    @Captor ArgumentCaptor<Collection<DataCellItem>> dataItemsCaptor;
    @Captor ArgumentCaptor<String> dataItemCaptor;
    @Captor ArgumentCaptor<Integer> positionCaptor;

    @Test
    public void shouldGetCorrectItemCount() {

        assertThat(dynamicRecyclerViewAdapter.getItemCount()).isEqualTo(4);
    }

}