ExpressionEvaluator eval = (ExpressionEvaluator) evalControl.getMock();
eval.evaluate( rule.condition );
evalControl.expectAndDefaultThrow( null, new ExpressionEvaluationException( "expected error" ) );
evalControl.replay();
EnforcerRuleHelper helper = EnforcerTestUtils.getHelper( project, eval );
rule.execute( helper );
fail( "Expected an exception." );
}
catch ( EnforcerRuleException e )
{