code: public static void awaitRoute(URL routeUrl, int timeout, TimeUnit timeoutUnit, int repetitions, int... statusCodes) {
          AtomicInteger successfulAwaitsInARow = new AtomicInteger(0);
          await().atMost(timeout, timeoutUnit).until(() -> {
              if (tryConnect(routeUrl, statusCodes)) {
                  successfulAwaitsInARow.incrementAndGet();
              } else {
                  successfulAwaitsInARow.set(0);
              }
              return successfulAwaitsInARow.get() >= repetitions;
          });
      }
docs: Waits for the timeout duration until the url responds with correct status code
  
  @param routeUrl    URL to check (usually a route one)
  @param timeout     Max timeout value to await for route readiness.
  If not set, default timeout value is set to 5.
  @param timeoutUnit TimeUnit used for timeout duration.
  If not set, Minutes is used as default TimeUnit.
  @param repetitions How many times in a row the route must respond successfully to be considered available.
  @param statusCodes list of status code that might return that service is up and running.
  It is used as OR, so if one returns true, then the route is considered valid.
  If not set, then only 200 status code is used.