public static void executeWithRetry(RetryFunction function) throws Exception {
    executeWithRetry(maxAttempts, minDelay, function);
  }
@Test
  public void retryFunctionThatFailsWithMoreAttempts() throws Exception {
    exceptionRule.expect(SQLException.class);
    exceptionRule.expectMessage("Problem with connection");
    executeWithRetry(4, 1_000, IOITHelperTest::failingFunction);
    assertEquals(4, listOfExceptionsThrown.size());
  }