public class HashCodeAndEqualsMockWrapper extends Object
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 :
System.identityHashCode(java.lang.Object)
HashCodeAndEqualsSafeSet
Constructor and Description |
---|
HashCodeAndEqualsMockWrapper(Object mockInstance) |
public HashCodeAndEqualsMockWrapper(Object mockInstance)
public Object get()
public static HashCodeAndEqualsMockWrapper of(Object mock)