Running into the below error when using Powermockito and Mockito to build some simple unit tests for a connection pool I made that wraps around Hikari CP. The setup of the
Going to post an answer just in case someone else sees this. Reverting all versions to 1.6.5 solved the problem.
I don't have enough reputation to comment, so unfortunately I am using the answer space to comment.
Markll, I am running into similar issues, here's my SO question - org.powermock.reflect.exceptions.MethodNotFoundException: - when mocking java sql classes Does Mockito.when(mockConnection.createStatement()).thenReturn(mockStatement); work for you? Mine doesn't even get past that. May be you can help me with that. My latest conclusion is since Connection, Statement and ResultSets are actually interfaces not classes, that's the reason it's throwing the error saying it can't find in the hierarchy of Object.