How do I test the Model class' equals()
method. I keep experiencing the following issue:
<<< FAILURE! - in EmployeeTest
testEquals(EmployeeTest) Time elapsed: <<< ERROR!
org.mockito.exceptions.misusing.UnfinishedVerificationException:
Missing method call for verify(mock) here:
-> at EmployeeTest.testEquals(EmployeeTest.java:20)
Example of correct verification:
verify(mock).doSomething()
Also, this error might show up because you verify either of: final/private/equals()/hashCode() methods.
Those methods *cannot* be stubbed/verified.
Mocking methods declared on non-public parent classes is not supported.
Sample test method. Using Mockito.verify() for testing equals method.