-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Description
I'm using IdiomaticMockito in my test.
val mocked = mock[Map[String, String]]
mocked.apply(*) shouldReturn "123"
mocked("key") should equal("123")
mocked.apply(*) wasCalled once
This fails at run-time as shown below. A workaround is:
abstract class TestMap extends Map[String, String]
val mocked = mock[TestMap]
Note that the first example works fine with regular Mockito.
The failure:
There was 1 failure:
1) initializationError(<MYTESTPATH>)
java.lang.StackOverflowError
at ru.vyarus.java.generics.resolver.util.GenericsResolutionUtils.resolveGenerics(GenericsResolutionUtils.java:92)
at ru.vyarus.java.generics.resolver.util.walk.TypesWalker.visitGenerics(TypesWalker.java:120)
....
Metadata
Metadata
Assignees
Labels
No labels