IncompatibleClassChangeError when using argThat
See original GitHub issueI get an IncompatibleClassChangeError
with any use of the argThat
matcher. Full stacktrace: https://pastebin.com/4hr67L0r. I am using version 2.0.0
.
Here is a simple example I replicated the problem with:
interface Foo {
fun doIt(arg: Int): Int
}
class TestClass {
@Test
fun testIt() {
mock<Foo> {
on { doIt(argThat { true }) } doReturn 0
}
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
IncompatibleClassChangeError when using argThat #307
I get an IncompatibleClassChangeError with any use of the argThat matcher. Full stacktrace: https://pastebin.com/4hr67L0r.
Read more >Mockito argThat does not work when used to match an iterator ...
I've never used Mockito.argThat , partially because I never had the need in defining custom argument matcher. When I understand your use ......
Read more >Binary compatibility report for Mockito: 1.10.19 vs 2.1.0
This class became interface. A client program may be interrupted by IncompatibleClassChangeError or InstantiationError exception dependent on ...
Read more >java web开发问题集锦_johnny233的博客
what-causes-java-lang-incompatibleclasschangeerror ... argThat;//来自mockito-core.jar import static org.mockito.ArgumentMatchers.
Read more >Diff - platform/frameworks/base - Google Git
If so, make sure they are using the correct transaction ids and arguments. ... getInputType(); + } catch (IncompatibleClassChangeError e) { + mEditor....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Octogonapus @timbaer I had same issue with mockito-kotlin 2.1.0 and I fixed it by adding explicit dependency to mockito-core 2.23.0
Adding explicit dependency to
testImplementation("org.mockito:mockito-core:2.23.0")
solve the issue for me, thanks @kevcodez