title: Mocking a Class For Unit Tests
body: <p>I've <code>Class A</code> that has an instance of another <code>Class B</code>. I've completed unit testing of independent code in <code>Class B</code>. For other operations, <code>Class A</code> invokes methods of <code>Class B</code>, does some processing using other classes and then invokes methods of <code>Class B</code>.</p>
  
  <p>My question is how do I mock the dependency of <code>Class A</code> and complete unit testing of <code>Class B</code>? If <code>Class B</code> uses instance of <code>Class A</code>, I can mock <code>Class A</code> and complete the task. However, in my case <code>Class A</code> uses instance of <code>Class B</code>.</p>
  
  <p>How do I mock in this scenario for unit testing?</p>