I have an ArrayList in Java which is made up of a type containing two strings and an integer. I can successfully test if one element of this ArrayList equals another but I f
My guess is that you've only written a "strongly typed" equals method instead of overriding equals(Object). In other words, if you've got:
public boolean equals(Foo f)
you need
public boolean equals(Object o)
as well to override Object.equals.
That would fit with "equals works but contains doesn't because your tests probably call the strongly-typed equals, but ArrayList doesn't.