@Test
public final void test_isValidPolicyConditions() {

	long id = 7;
	when(_serviceDef.getId()).thenReturn(id);
	// null/empty policy conditions are ok
	assertTrue(_validator.isValidPolicyConditions(id,null, _failures, Action.CREATE));
	assertTrue(_failures.isEmpty());
	List<RangerPolicyConditionDef> conditionDefs = new ArrayList<>();
	assertTrue(_validator.isValidPolicyConditions(id, conditionDefs, _failures, Action.CREATE));
	assertTrue(_failures.isEmpty());
	
	Object[][] policyCondition_data = {
		//  { id, name, evaluator }	
			{ null, null, null}, // everything null!
			{ 1L, "condition-1", null }, // missing evaluator
			{ 1L, "condition-2", "" }, // duplicate id, missing evaluator
			{ 2L, "condition-1", "com.evaluator" }, // duplicate name
	};
	
	conditionDefs.addAll(_utils.createPolicyConditionDefs(policyCondition_data));
	_failures.clear(); assertFalse(_validator.isValidPolicyConditions(id, conditionDefs, _failures, Action.CREATE));
	_utils.checkFailureForMissingValue(_failures, "policy condition def itemId");
	_utils.checkFailureForMissingValue(_failures, "policy condition def name");
	_utils.checkFailureForMissingValue(_failures, "policy condition def evaluator");
	_utils.checkFailureForSemanticError(_failures, "policy condition def itemId", "1");
	_utils.checkFailureForSemanticError(_failures, "policy condition def name", "condition-1");
	_utils.checkFailureForMissingValue(_failures, "policy condition def evaluator", "condition-2");
	_utils.checkFailureForMissingValue(_failures, "policy condition def evaluator", "condition-1");
}