### Question:
EntityTableModel extends AbstractTableModel { public int getRowCount() { return d_entities.size(); } EntityTableModel(Class<? extends Entity> entityType, ObservableList<? extends Entity> entities, List<String> properties, PresentationModelFactory pmf); int getColumnCount(); int getRowCount(); Object getValueAt(int row, int column); @Override String getColumnName(int columnIndex); @Override Class<?> getColumnClass(int columnIndex);  }### Answer:
@Test public void testGetRowCount() { assertEquals(d_domain.getDrugs().size(), d_tableModel.getRowCount()); }
@Test public void testDrugAddedUpdatesTable() { int prevSize = d_tableModel.getRowCount(); TableModelListener mock = JUnitUtil.mockTableModelListener(new TableModelEvent(d_tableModel)); d_tableModel.addTableModelListener(mock); d_domain.getDrugs().add(ExampleData.buildDrugViagra()); verify(mock); assertEquals(prevSize + 1, d_tableModel.getRowCount()); }