/**
* Test for equals function of Validator
*/
public void testEquals()
{
ByteLengthValidator validator = new ByteLengthValidator();
//1
validator.setEncoding("ISO-8859-1");
validator.setMaximum(100);
validator.setMessageDetailMaximum("MaxMessage");
ByteLengthValidator otherValidator = new ByteLengthValidator();
otherValidator.setEncoding("ISO-8859-1");
otherValidator.setMaximum(100);
otherValidator.setMessageDetailMaximum("MaxMessage");
doTestEquals(validator, otherValidator, true);
assertEquals(validator.hashCode(), otherValidator.hashCode());
//2
otherValidator.setMaximum(150);
validator.setMaximum(150);
validator.setMessageDetailMaximum("MaxMessage1");
otherValidator.setMessageDetailMaximum("MaxMessage1");
doTestEquals(validator, otherValidator, true);
assertEquals(validator.hashCode(), otherValidator.hashCode());
//3
otherValidator.setMaximum(200);
otherValidator.setMessageDetailMaximum("MaxMessage");
doTestEquals(validator, otherValidator, false);
assertEquals(false, (validator.hashCode() == otherValidator.hashCode()));
}