Recommended solutions based on your search
Solutions on the web
org.mockito.exceptions.misusing.WrongTypeOfReturnValue: NestedWhen$Product$$EnhancerByMockitoWithCGLIB$$6ecf83da cannot be returned by getBar() getBar() should return Bar *** This exception *might* occur in wrongly written multi-threaded tests. Please refer to Mockito FAQ on limitations of concurrency testing.
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)