### Question:
ChainedValidationStep implements ValidationStep<T> { @Override @SuppressWarnings("PMD.DataflowAnomalyAnalysis") public ValidationErrors validate(Validatable<T> validatable, T target) { ValidationErrors error = ValidationErrors.empty(); for (var current = this; current != null; current = current.next) { val a = validate(current.action, validatable, target); if (a.isEmpty()) { return a; } } return error; } ChainedValidationStep(ValidationStep<T> action); ChainedValidationStep<T> add(ValidationStep<T> n); @Override @SuppressWarnings("PMD.DataflowAnomalyAnalysis") ValidationErrors validate(Validatable<T> validatable, T target);  }### Answer:
@Test void verifyNoValidationStepsAreCalledWhenYieldIsEmpty() { val cvs = new ChainedValidationStep<>((a, b) -> empty()); val validatable = mock(Validatable.class); cvs.validate(validatable, new Object()); verify(validatable, never()).notify(any(), any()); }