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