mockito/mockito — pull request #60 by davidmichaelkarr (2014-07-01 16:37:22+00:00)
Title: Adding "getRealClass()" method to MockingDetails and DefaultMockingDetails

In some situations, it's useful to get from a mock object the original class object that was mocked to produce the mocked class. The logical place to provide this information is in the MockingDetails interface, and in the DefaultMockingDetails implementation. The method that provides this information should return a reasonable result if the object is either a mock, a spy, or neither.

This change adds the method to the interface and implementation, and also adds a unit test for DefaultMockingDetails which includes tests for this new method and some tests for some of the existing methods in the class.