### Question:
ActivityItemCell extends ListCell<ActivityItem> { @Override public void updateItem(ActivityItem item, boolean empty) { super.updateItem(item, empty); if (empty) { clearContent(); } else { addContent(item); } } ActivityItemCell(); @Override void updateItem(ActivityItem item, boolean empty);  }### Answer:
@Test public void testUpdate_empty() { cell.updateItem(item, true); assertNull(cell.getText()); assertNull(cell.getGraphic()); }
@Test public void testUpdate_notEmpty() { cell.updateItem(item, false); assertNull(cell.getText()); assertNotNull(cell.getGraphic()); GridPane grid = (GridPane)cell.getGraphic(); boolean foundTitle = findLabelText("Title", grid.getChildren()); if(!foundTitle) { fail("Did not find title."); } boolean foundDescription = findLabelText("Description", grid.getChildren()); if(!foundDescription) { fail("Did not find description."); } }