title: Unit Testing with a Mocked Class
body: <p>Some sites I have looked at state that while you (the developer) are implementing your class (X) which depends on another class (Y) for information and assume that class (Y) has not yet been developed by your development team, then in your unit testing of class (X) you should mock class (Y).</p>
  
  <p>What I want to know is what you should do when eventually class (Y) does get implemented by the development team? Does the developer of class (X) now have to go back to the unit tests where he/she created mocks of class (Y) and call the real object instead? </p>
  
  <p>And if we were to put real development timelines into perspective class (X) may have been implemented a month or more before class (Y) and the developer of class (X) who has also written the unit tests for class (X) probably has moved on to other tasks assigned to him/her; how could this person now allocate time to go back and re-invest the time to rewrite their old unit tests - wouldn't this just be a management nightmare?</p>