ValidatorParameterHelper { public OneParamValidator annotatedWith(Class<? extends Annotation> annotationClass) { return param(new AnnotatedWithParameterRequirement(annotationClass)); } ValidatorParameterHelper(TargetAnnotationHelper targetAnnotationHelper); Validator noParam(); OneParamValidator type(String qualifiedName); OneParamValidator extendsType(String qualifiedName); OneParamValidator extendsAnyOfTypes(String... types); OneParamValidator anyType(); OneParamValidator annotatedWith(Class<? extends Annotation> annotationClass); OneParamValidator primitiveOrWrapper(TypeKind primitive); OneParamValidator anyOfTypes(String... types); OneParamValidator param(ParameterRequirement parameterRequirement); InOrderParamValidator inOrder(); AnyOrderParamValidator anyOrder();  }
@Test public void annotatedParam() throws Exception { ExecutableElement executableElement = createMethod(p(String.class, TestAnnotation.class)); ElementValidation valid = new ElementValidation("", executableElement); validator.annotatedWith(TestAnnotation.class).validate(executableElement, valid); assertTrue(valid.isValid()); }