### Question:
MethodMdcsValidator extends MdcsValidator { @Override public void validate(Method method, Collection<Mdc> target) throws AnnotationUsageException { super.validate(method, target); target.stream() .filter(mdc -> mdc.value().isEmpty()) .findFirst() .ifPresent(mdc -> { if (method.getParameterCount() == 0) { throw new AnnotationUsageException(method, "Method not contains any parameters", "Do not use empty @Mdc annotation on method without parameters", mdc); } }); }  @Override void validate(Method method, Collection<Mdc> target);  }### Answer:
@Test(expected = AnnotationUsageException.class) public void validateEmptyWithoutParameters() { Mdc mdc = AnnotationUtils.synthesizeAnnotation(Mdc.class); Collection<Mdc> target = singletonList(mdc); methodMdcsValidator.validate(method, target); }