Class HashCodeAndEqualsMockWrapper

java.lang.Object
org.mockito.internal.util.collections.HashCodeAndEqualsMockWrapper

public class HashCodeAndEqualsMockWrapper extends Object
hashCode and equals safe mock wrapper.

It doesn't use the actual mock Object.hashCode() and Object.equals(java.lang.Object) method as they might throw an NPE if those method cannot be stubbed even internally.

Instead the strategy is :

See Also:
  • Field Details

    • mockInstance

      private final Object mockInstance
  • Constructor Details

    • HashCodeAndEqualsMockWrapper

      public HashCodeAndEqualsMockWrapper(Object mockInstance)
  • Method Details