title: How to mock a method called inside another method?
body: <p>I would like to explain my problem using an example.</p>
  
  <pre><code>Class A
  {
      Fun1()
      {
          // some code
          B obj2 = new B();
          obj2.Fun2();
      }
  }
  
  Class B
  {
      Fun2() 
      {
          // some code
      }
  }
  
  // Test Class for Class A
  Class A_Test
  {
      Fun1_Test()
      {
          A obj1 = new A();
          A.Fun1();
      }
  }
  </code></pre>
  
  <p>Here I am calling <code>Fun1</code> which calls <code>fun2()</code>. I want to mock call to fun2().</p>
  
  <p>I need to do initialization of Class B object in Fun1() only, I don't want to do it using constructor.</p>
  
  <p>It is possible to mock call to fun2()?</p>