### Question:
DefaultDataModelRowSet implements DataModelRowSet<E> { public long getTotalRowCount() { return this.totalRowCount; } DefaultDataModelRowSet(List<E> contents);  DefaultDataModelRowSet(int offset, List<E> contents);  DefaultDataModelRowSet(int offset, List<E> contents, long totalRowCount);  DefaultDataModelRowSet(int offset, List<E> contents, int size, long totalRowCount); long getTotalRowCount(); boolean contains(int rowIndex); boolean isRowAvailable(int rowIndex); E getRowData(int rowIndex); @SuppressWarnings("unchecked") static DataModelRowSet<E> emptySet(); static DataModelRowSet<E> emptySet(int rowIndex);  }### Answer:
@Test public void shouldNotHaveRowCountWhenEmpty() throws Exception { assertThat(this.empty.getTotalRowCount(), is(-1L)); }
@Test public void shouldSupportSpecifiedTotalRowCount() throws Exception { List<String> contents = Arrays.asList("a", "b", "c"); DefaultDataModelRowSet<String> dataSet = new DefaultDataModelRowSet<String>(0, contents, 3); assertThat(dataSet.getTotalRowCount(), is(3L)); }