-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another
Description
Built-in support for Mockito beans inside a Spring context is nice, but the current snapshot (2016-07-05) fails with the following error when used with Mockito 2.0.47-beta+:
Caused by: java.lang.NoSuchMethodError: org.mockito.Answers.get()Lorg/mockito/stubbing/Answer;
at org.springframework.boot.test.mock.mockito.MockDefinition.createMock(MockDefinition.java:154)
at org.springframework.boot.test.mock.mockito.MockitoPostProcessor.createMock(MockitoPostProcessor.java:206)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 46 more
There reason is removing (in 2.0.47-beta) a deprecated get() method which were stopped to be needed when Answers started to implement Answer interface directly (in 2.0.2-beta).
Mockito 2.x is still a moving target, but it would be bad to force people to hack MockDefinition locally due to one method. I will prepare a PR to handle both Mockito versions.
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another