0
votes

I am need to unmock a static method & call the real method in the class constructor as this will give connection to the DB. Now using powermock when I say @RunWith(PowerMockRunner.class) it doesnt allow me to call the real method. This was possible in mockito but I need to use powermock as I need to mock other static methods too.

public TestESMock() throws ConfigurationException{

 DatabaseImpl dbImpl=DatabaseImpl.newDatabaseImpl(null);    


}

Can someone tell me how to I do this.

1

1 Answers

0
votes

There was no problem with powermockito. I was getting exception as powermockito 1.5.6 was not able to connect with SQL Server JDBC4