@Test(expected = ConstraintViolationException.class)
public void testEqualConstraintFailString() throws ConstraintViolationException {

    EqualConstraint constraint = new EqualConstraint();
    constraint.setEqual("value");
    constraint.validate("othervalue");
}