title: How to retrieve cellForRow(at:) when tableview isn't visible
body: <p>I've created a class that contains all UITableView protocol methods. I'm using it successfully in a ViewController that has a tableview on its scene. </p>
  
  <p>The advantage to having all of the tableview code in a different class is that I should be able to unit test tableview methods. The problem I'm running into is that when I call <code>cellForRow(at:)</code>, it returns a <code>nil</code> cell.</p>
  
  <p>I can put a breakpoint in the tableview class's <code>cellForRow(at:)</code> and see just before it <code>return cell</code> that the cell is valid. Once I leave <code>cellForRow(at:)</code> and go back into the unit test, the returned cell is nil.</p>
  
  <p>This happens because none of the cells are visible. This thread [ <a href="https://stackoverflow.com/questions/42466837/table-views-cellforrowat-is-nil-in-unit-test">Table view&#39;s `cellForRow(at:)` is `nil` in Unit Test</a> ] hits on the problem but not solution for this specific case.</p>
  
  <p>Is there some way to return a cell from <code>cellForRow(at:)</code> when the tableview/cells are not visible? </p>