title: Unit testing of UITableView cell. Access to cell's nib
body: <p>I try to test whether my table view cell gets right values. The cell is customized and has its own xib file.</p>
  
  <pre><code>self.organizationController?.organizationsTableView.registerNib(UINib.init(nibName:String(OrganizationTableViewCell), bundle: nil), forCellReuseIdentifier: String(OrganizationTableViewCell))
  let organizationName = "Name"
  let organization = Organization.organizationWithName(organizationName, index: 0)
  self.organizationController?.organizations = [organization]
  let cell = self.organizationController?.organizationsTableView.cellForRowAtIndexPath(NSIndexPath(forRow: 0, inSection: 0)) as! OrganizationTableViewCell
  XCTAssertEqual(cell.organizationNameLabel.text, organizationName, "Cell created properly")
  </code></pre>
  
  <p>With this code I got an error: <code>Could not cast value of type 'myApplication.OrganizationTableViewCell' to 'myApplicationTests.OrganizationTableViewCell'</code></p>
  
  <p>When I change module in xib file to <code>myApplicationTests</code> it starts to work properly for test cases but doesn't work for a usual application run. How can I handle this problem?</p>