@Test
public void test_isValid_withId_errorConditions() throws Exception {

	// api that takes in long is only supported for delete currently
	Assert.assertFalse(_validator.isValid(1L, Action.CREATE, _failures));
	_utils.checkFailureForInternalError(_failures);
	// passing in a null id is a failure!
	_validator = new RangerServiceValidator(_store);
	_failures.clear(); Assert.assertFalse(_validator.isValid((Long)null, Action.DELETE, _failures));
	_utils.checkFailureForMissingValue(_failures, "id");
	// if service with that id does not exist then that, is ok because delete is idempotent
	when(_store.getService(1L)).thenReturn(null);
	when(_store.getService(2L)).thenThrow(new Exception());
	_failures.clear(); Assert.assertTrue(_validator.isValid(1L, Action.DELETE, _failures));
	Assert.assertTrue(_failures.isEmpty());
	_failures.clear(); Assert.assertTrue(_validator.isValid(2L, Action.DELETE, _failures));
	Assert.assertTrue(_failures.isEmpty());
}