/**
* Tests the equals() and hashCode() methods.
*/
public void testEqualsHashcode() {
Multiplicity m = Multiplicity.getBoundedInstance(3, 4);
Multiplicity m2 = Multiplicity.getBoundedInstance(3, 4);
Multiplicity m3 = Multiplicity.getBoundedInstance(1, 2);
Multiplicity m4 = Multiplicity.getUnboundedInstance(2);
Multiplicity m5 = Multiplicity.getUnboundedInstance(2);
Multiplicity m6 = Multiplicity.getUnboundedInstance(3);
assertFalse(m.equals(null));
assertFalse(m.equals("someobject"));
assertTrue(m.equals(m2));
assertEquals(m.hashCode(), m2.hashCode());