new NotXPathCondition("//DIV[@id='INVARIANT_VIOLATION']");
builder.crawlRules().addInvariant(VIOLATED_INVARIANT_DESCRIPTION,
neverDivWithInvariantViolationId);
// should never fail
RegexCondition onInvariantsPagePreCondition = new RegexCondition(INVARIANT_TEXT);
XPathCondition expectElement =
new XPathCondition("//DIV[@id='SHOULD_ALWAYS_BE_ON_THIS_PAGE']");
builder.crawlRules().addInvariant(
new Invariant("testInvariantWithPrecondiions", expectElement,
onInvariantsPagePreCondition));