### Question:
LazyDataModel extends DataModel<E> { @Override public int getRowCount() { Long rowCount = this.state.getLastLoadedTotalRowCount(); if (rowCount == null) { rowCount = getAnyNonEmptyRowSet().getTotalRowCount(); } Assert.state(rowCount != null, "The row count must not be null"); Assert.state(rowCount >= -1, "The row count must be -1 or higher"); if (rowCount > Integer.MAX_VALUE) { return -1; } return rowCount.intValue(); } LazyDataModel(LazyDataLoader<E, S> loader, S state); @Override boolean isRowAvailable(); @Override int getRowCount(); void clearCachedRowCount(); void clearCachedRowCount(int nextRowIndex); @Override E getRowData(); @Override int getRowIndex(); @Override void setRowIndex(int rowIndex); @Override Object getWrappedData(); @Override void setWrappedData(Object o);  }### Answer:
@Test public void shouldGetRowCountFromProvider() throws Exception { assertThat(this.dataModel.getRowCount(), is(1000)); }