question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

There is a issue, after I downgrade the Mockito version, it disappeared

See original GitHub issue

Hi guys, I found an issue, when I try to mock Realm with Mockito 2.10.0 and PowerMock 1.7.0RC4 , I get an error:

java.lang.NoSuchMethodError: org.mockito.internal.handler.MockHandlerFactory.createMockHandler(Lorg/mockito/mock/MockCreationSettings;)Lorg/mockito/internal/InternalMockHandler;

then I downgrade Mockito to 2.8.47(I tried that it works well on <= 2.8.47), the error disappeared, so I just wondering is it a bug in new versions? Thanks 😉

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

47reactions
kwilliams3commented, Jan 31, 2018

Confirmed, upgrading to 2.0.0-beta.5 does solve the problem. I had to do this for both powermock-api-mockito2 and powermock-module-junit4

6reactions
goxr3pluscommented, Nov 14, 2018

@kwilliams3 You comment saved me just now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mockito cannot mock this class - java - Stack Overflow
Using Java 11, I solved this issue by including the following dependency in build.gradle : compile group: 'org.mockito', name: 'mockito-core', version: ...
Read more >
Downgrading versions and excluding dependencies
In general, forcing dependencies is done to downgrade a dependency. There might be different use cases for downgrading: a bug was discovered in...
Read more >
Migrating from Mockito 2.28 to 3.7 and many tests immediately ...
I moved the location of the <dependency> node for mockito-inline to come AFTER the dependency node for powermockito. This, along with the changes...
Read more >
Exception: intellij failed to resolve org.junit.platform:junit ...
I reinstalled earlier version (2021.1.3), and I see in the install that there is an option to include the PATH variable for launchers....
Read more >
AssertJ - fluent assertions java library - GitHub Pages
In your IDE, add src/test/generated-assertions to the project java sources if you IDE shows errors/missing classes. 2.9. Release Notes. AssertJ Core would not ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found