private void expectFailure(Callable callable, String reason, Predicate<Exception> predicate) {
    try {
      callable.call();
      fail("Expected failure due to " + reason);
    } catch (Exception e) {
      assertTrue(predicate.test(e));
    }
  }
Call a lambda and expect failure.
@param callable the {@link Callable} to run.
@param reason the reason for expected failure.
@param predicate the predicate for the exception to match.
ambry-mysql/src/test/java/com/github/ambry/mysql/MySqlDataAccessorTest.java