### Question:
RangerValidator { public void validate(Long id, Action action) throws Exception { if(LOG.isDebugEnabled()) { LOG.debug("==> RangerValidator.validate(" + id + ")"); } List<ValidationFailureDetails> failures = new ArrayList<ValidationFailureDetails>(); if (isValid(id, action, failures)) { if(LOG.isDebugEnabled()) { LOG.debug("<== RangerValidator.validate(" + id + "): valid"); } } else { String message = serializeFailures(failures); LOG.debug("<== RangerValidator.validate(" + id + "): invalid, reason[" + message + "]"); throw new Exception(message); } } protected  RangerValidator(ServiceStore store); void validate(Long id, Action action);  }### Answer:
@Test public void test_validate() { try { _validator.validate(1L, Action.CREATE); fail("Should have thrown exception!"); } catch (Exception e) { String message = e.getMessage(); assertTrue(message.contains("internal error")); } }