### Question:
QuickGridView extends QuickViewBase<T> { protected RowItem<T> newRowItem(String id, int index) { RowItem<T> item = new RowItem<T>(id,index, new Model()); return item; } QuickGridView(String id, IDataProvider<T> dataProvider, IQuickReuseStrategy reuseStrategy);  QuickGridView(String id, IDataProvider<T> dataProvider);  QuickGridView(String id, IDataProvider<T> dataProvider, IQuickReuseStrategy reuseStrategy, Component start, Component end);  QuickGridView(String id, IDataProvider<T> dataProvider, Component start, Component end); int getColumns(); QuickGridView<T> setColumns(int cols); int getRows(); QuickGridView<T> setRows(int rows); @Override IItemFactory<T> factory(); QuickGridView<T> addRowAtStart(RowItem<T> rowItem); QuickGridView<T> addRow(RowItem<T> rowItem); QuickGridView<T> addRows(Iterator<? extends T> iterator); QuickGridView<T> addRowsAtStart(Iterator<? extends T> iterator); void removeRow(RowItem<T> rowItem); MarkupContainer simpleAddRow(Component... components); MarkupContainer simpleRemoveRow(Component c); MarkupContainer simpleRemoveAllRows(); Iterator<RowItem<T>> buildRows(Iterator<? extends T> iterator); @Override void createChildren(Iterator<Item<T>> itemIterator); @Override List<Item<T>> addItemsForPage(long page); int gridSize(); CellItem<T> buildCellItem(String id, int index, T object); CellItem<T> buildEmptyCellItem(int index); CellItem<T> buildEmptyCellItem(String id, int index); RowItem buildRowItem(String id, int index); RowItem buildRowItem(); Iterator<RowItem<T>> rows(); Iterator<CellItem<T>> cells(); CellItem<T> buildCellItem(int index, IModel<T> model); CellItem<T> newEmptyCellItem(String id, int index); static final String COLUMNS_REPEATER_ID; }### Answer:
@Test(groups = {"wicketTests"}) public void newRowItem_1() { IDataProvider provider = Mockito.mock(IDataProvider.class); QuickGridView grid = new QuickGridView("grid", provider) { @Override protected void populate(CellItem item) { } @Override protected void populateEmptyItem(CellItem item) { } }; final String id = "id"; final long index = 845; QuickGridView.RowItem row = grid.newRowItem(id, 845); Assert.assertEquals(row.getIndex(), index); Assert.assertEquals(row.getId(), id); }