@Test public void testSingleNullParamViolation() { try { assertEquals("abc", service.singleStringParam(null)); fail(); } catch (BeanValidationException ve) { String msg = ve.getMessage(); assertTrue(msg, msg.contains("METHOD_PARAM_INDEX_0=[NULL_ROOT_OBJECT]")); } }
private boolean contains(Annotation[] annotations, Class<?> annotation) { Optional<Annotation> res = Arrays.asList(annotations).stream() .filter(a -> a.annotationType().isAssignableFrom(annotation)).findFirst(); return res.isPresent(); }
AopValidator { private boolean contains(Annotation[] annotations, Class<?> annotation) { Optional<Annotation> res = Arrays.asList(annotations).stream() .filter(a -> a.annotationType().isAssignableFrom(annotation)).findFirst(); return res.isPresent(); } }
AopValidator { private boolean contains(Annotation[] annotations, Class<?> annotation) { Optional<Annotation> res = Arrays.asList(annotations).stream() .filter(a -> a.annotationType().isAssignableFrom(annotation)).findFirst(); return res.isPresent(); }  }
AopValidator { private boolean contains(Annotation[] annotations, Class<?> annotation) { Optional<Annotation> res = Arrays.asList(annotations).stream() .filter(a -> a.annotationType().isAssignableFrom(annotation)).findFirst(); return res.isPresent(); }   }
AopValidator { private boolean contains(Annotation[] annotations, Class<?> annotation) { Optional<Annotation> res = Arrays.asList(annotations).stream() .filter(a -> a.annotationType().isAssignableFrom(annotation)).findFirst(); return res.isPresent(); }    }