### Question:
ValidationParameterEnricher extends BaseParameterEnricher { @Override public Map<String, String> onParameterAnnotation(final String parameterName, final Type parameterType, final Annotation annotation) { final Class<?> asClass = toClass(parameterType); return ofNullable(annotation.annotationType().getAnnotation(Validations.class)) .map(v -> Stream.of(v.value())) .orElseGet(() -> ofNullable(annotation.annotationType().getAnnotation(Validation.class)) .map(Stream::of) .orElseGet(Stream::empty)) .filter(v -> Stream.of(v.expectedTypes()).anyMatch(t -> asClass != null && t.isAssignableFrom(asClass))) .findFirst() .map(v -> singletonMap(META_PREFIX + v.name(), getValueString(annotation))) .orElseGet(Collections::emptyMap); }  @Override Map<String, String> onParameterAnnotation(final String parameterName, final Type parameterType,
            final Annotation annotation); static final String META_PREFIX; }### Answer:
@Test void minValue() { assertEquals(singletonMap("tcomp::validation::min", "5.0"), enricher.onParameterAnnotation("testParam", int.class, new Min() { @Override public Class<? extends Annotation> annotationType() { return Min.class; } @Override public double value() { return 5; } })); }
@Test void maxValue() { assertEquals(singletonMap("tcomp::validation::max", "5.0"), enricher.onParameterAnnotation("testParam", int.class, new Max() { @Override public Class<? extends Annotation> annotationType() { return Max.class; } @Override public double value() { return 5; } })); }
@Test void minCollection() { assertEquals(singletonMap("tcomp::validation::minItems", "5.0"), enricher.onParameterAnnotation("testParam", Collection.class, new Min() { @Override public Class<? extends Annotation> annotationType() { return Min.class; } @Override public double value() { return 5; } })); }
@Test void maxCollection() { assertEquals(singletonMap("tcomp::validation::maxItems", "5.0"), enricher.onParameterAnnotation("testParam", Collection.class, new Max() { @Override public Class<? extends Annotation> annotationType() { return Max.class; } @Override public double value() { return 5; } })); }
@Test void minlength() { assertEquals(singletonMap("tcomp::validation::minLength", "5.0"), enricher.onParameterAnnotation("testParam", String.class, new Min() { @Override public Class<? extends Annotation> annotationType() { return Min.class; } @Override public double value() { return 5; } })); }
@Test void maxLength() { assertEquals(singletonMap("tcomp::validation::maxLength", "5.0"), enricher.onParameterAnnotation("testParam", String.class, new Max() { @Override public Class<? extends Annotation> annotationType() { return Max.class; } @Override public double value() { return 5; } })); }
@Test void pattern() { assertEquals(singletonMap("tcomp::validation::pattern", "test"), enricher.onParameterAnnotation("testParam", String.class, new Pattern() { @Override public Class<? extends Annotation> annotationType() { return Pattern.class; } @Override public String value() { return "test"; } })); }
@Test void required() { assertEquals(singletonMap("tcomp::validation::required", "true"), enricher.onParameterAnnotation("testParam", Collection.class, new Required() { @Override public Class<? extends Annotation> annotationType() { return Required.class; } })); }
@Test void unique() { assertEquals(singletonMap("tcomp::validation::uniqueItems", "true"), enricher.onParameterAnnotation("testParam", Collection.class, new Uniques() { @Override public Class<? extends Annotation> annotationType() { return Uniques.class; } })); }
@Test void enumType() { assertEquals(singletonMap("tcomp::validation::uniqueItems", "true"), enricher.onParameterAnnotation("testParam", Collection.class, new Uniques() { @Override public Class<? extends Annotation> annotationType() { return Uniques.class; } })); }