How would I go about writing a test case for this equals method that compares ID numbers after it checks if an object is an "Integer" or "Patron".
Here is the method:
public boolean equals(Object other) {
boolean bool = false;
if (other instanceof Patron) {
Patron patron = (Patron) other;
bool = this.idNumber == patron.idNumber;
} else if (other instanceof Integer) {
Integer id = (Integer) other;
bool = this.idNumber == id;
}
return bool;