### Question:
WeakSubjectivityValidator { public void handleValidationFailure(final String message) { for (WeakSubjectivityViolationPolicy policy : violationPolicies) { policy.onFailedToPerformValidation(message); } } WeakSubjectivityValidator(
      final WeakSubjectivityConfig config,
      WeakSubjectivityCalculator calculator,
      List<WeakSubjectivityViolationPolicy> violationPolicies); static WeakSubjectivityValidator strict(final WeakSubjectivityConfig config); static WeakSubjectivityValidator lenient(); static WeakSubjectivityValidator lenient(final WeakSubjectivityConfig config); Optional<Checkpoint> getWSCheckpoint(); SafeFuture<Void> validateChainIsConsistentWithWSCheckpoint(
      CombinedChainDataClient chainData); void validateLatestFinalizedCheckpoint(
      final CheckpointState latestFinalizedCheckpoint, final UInt64 currentSlot); boolean isBlockValid(
      final SignedBeaconBlock block, ForkChoiceStrategy forkChoiceStrategy); void handleValidationFailure(final String message); void handleValidationFailure(final String message, Throwable error); @Override boolean equals(final Object o); @Override int hashCode();  }### Answer:
@Test public void handleValidationFailure() { final WeakSubjectivityValidator validator = new WeakSubjectivityValidator(config, calculator, policies); final String message = "Oops"; validator.handleValidationFailure(message); orderedPolicyMocks.verify(policies.get(0)).onFailedToPerformValidation(message); orderedPolicyMocks.verify(policies.get(1)).onFailedToPerformValidation(message); orderedPolicyMocks.verifyNoMoreInteractions(); }
@Test public void handleValidationFailure_withThrowable() { final WeakSubjectivityValidator validator = new WeakSubjectivityValidator(config, calculator, policies); final String message = "Oops"; final Throwable error = new RuntimeException("fail"); validator.handleValidationFailure(message, error); orderedPolicyMocks.verify(policies.get(0)).onFailedToPerformValidation(message, error); orderedPolicyMocks.verify(policies.get(1)).onFailedToPerformValidation(message, error); orderedPolicyMocks.verifyNoMoreInteractions(); }