Added equals method
Added test for equals method