-
Notifications
You must be signed in to change notification settings - Fork 583
Closed
Description
Powermock is heavily relying on the internal workings of Mockito. As result hight cost of compatibility maintenance. We should move to using public SPI. Mockito team is ready to help and provide change in API.
Main goal: clean code without dirty hacks to get internals of Mockito.
We need:
- Identify using of Mockito internals and create a change request for Mockito
- Replace using internals of Mockito with using public API.
- Use delegate MockMaker to prevent issue with replacing Mockito MockMaker when PowerMock in class path (see PowerMockMaker with Mockito2 #769, Fixes #1003: Allow reloading of plugins. mockito/mockito#1004)
- Reporter - now internal, need ability to show custom message if mocking is failed for static methods
- Drop supporting Mockito 1.
Current mockito 2 compatibility issues:
- java.lang.IllegalAccessError: tried to access method org.mockito.internal.util.ObjectMethodsGuru.<init> #720 java.lang.IllegalAccessError: tried to access method org.mockito.internal.util.ObjectMethodsGuru.
- PowerMockito not compatible Mockito2 since their v2.0.55-beta release #706 PowerMockito not compatible Mockito2 since their v2.0.55-beta release
- java.lang.NoClassDefFoundError: org/mockito/MockitoAnnotations$Mock #678 java.lang.NoClassDefFoundError: org/mockito/MockitoAnnotations$Mock
- Problem when building Mocktio2 with gradle #681 Problem when building Mocktio2 with gradle
- java.lang.NoClassDefFoundError: org/mockito/exceptions/Reporter #684 java.lang.NoClassDefFoundError: org/mockito/exceptions/Reporter
- Crash with latest mockito2 #686 Crash with latest mockito2
- AbstractMethodError when used with Mockito 2.1.0 #700 AbstractMethodError when used with Mockito 2.1.0
- can't mock final methods with powermock-mockito2 1.7.0.RC4 and mockito2 inline feature enabled #774 can't mock final methods with powermock-mockito2 1.7.0.RC4 and mockito2 inline feature enabled
svenjacobs, ryot, smougenot, darxriggs and xinyi9mitermayer