@Test
public void should_raise_exception_when_bean_validation_error_for_property() throws Exception {
// Given
boolean exceptionRaised = false;
CompleteBean entity = new CompleteBean();
Path propertyPath = mock(Path.class);
when(validator.validate(entity)).thenReturn(Sets.<ConstraintViolation<CompleteBean>> newHashSet(violation));
when(violation.getLeafBean().getClass().getCanonicalName()).thenReturn("className");
when(violation.getPropertyPath()).thenReturn(propertyPath);
when(propertyPath.toString()).thenReturn("property");
when(violation.getMessage()).thenReturn("violation");
try {
// When
interceptor.onEvent(entity);