title: How to mock non static methods using PowerMock
body: <p>I am trying to mock an inner method call of my test method</p>
  
  <p>My class looks like this</p>
  
  <pre><code>public class App {
  public Student getStudent() {
      MyDAO dao = new MyDAO();
      return dao.getStudentDetails();//getStudentDetails is a public 
                                    //non-static method in the DAO class
  }
  </code></pre>
  
  <p>When I write the junit for the method getStudent(), is there a way in PowerMock to mock the line</p>
  
  <pre><code>dao.getStudentDetails();
  </code></pre>
  
  <p>or make the App class use a mock dao object during junit execution instead of the actual dao call which connects to the DB?</p>