code: protected boolean calculateFailureThresholdRateAndCompare(final List<Date> failures) {
          if (failures.size() < 2) {
              return false;
          }
          val lastTime = failures.get(0).getTime();
          val secondToLastTime = failures.get(1).getTime();
          val difference = lastTime - secondToLastTime;
          val rate = NUMBER_OF_MILLISECONDS_IN_SECOND / difference;
          LOGGER.debug("Last attempt was at [{}] and the one before that was at [{}]. Difference is [{}] calculated as rate of [{}]",
              lastTime, secondToLastTime, difference, rate);
          if (rate > getThresholdRate()) {
              LOGGER.warn("Authentication throttling rate [{}] exceeds the defined threshold [{}]", rate, getThresholdRate());
              return true;
          }
          return false;
      }
docs: Calculate threshold rate and compare boolean.
  Compute rate in submissions/sec between last two authn failures and compare with threshold.
  
  @param failures the failures
  @return the boolean