Is it possible to indicate in the code if this object is a Mockito mock or not?
The reason I would like to do this is to return another error message when it is used. This will be used to invite other developers to use a pre-prepared layout that is already set up to answer calls in a useful way, rather than creating the layout itself.
At the moment, the best I have is object.getClass().getName().contains("EnhancerByMockitoWithCGLIB") , but it seems to be hacked.
java mockito
mikej Jan 27 '12 at 15:36 2012-01-27 15:36
source share