test cases for the remaining lines of equal method