Is it possible to tell in code if a given object is a Mockito mock or not?
The reason I'd like to do this is to return a different error message when a mock is being used. This would be used to suggest to other developers that they should use a pre-prepared mock that is already set to answer calls in a useful way rather than creating the mock themselves.
At the moment the best I have is object.getClass().getName().contains("EnhancerByMockitoWithCGLIB")
but this feels hacky.