static void finishUpdateChecker(
      ConsoleLogger logger, Future<Optional<String>> updateCheckFuture) {
    UpdateChecker.finishUpdateCheck(updateCheckFuture)
        .ifPresent(
            latestVersion -> {
              String cliReleaseUrl =
                  ProjectInfo.GITHUB_URL + "/releases/tag/v" + latestVersion + "-cli";
              String changelogUrl = ProjectInfo.GITHUB_URL + "/blob/master/jib-cli/CHANGELOG.md";
              String privacyUrl = ProjectInfo.GITHUB_URL + "/blob/master/docs/privacy.md";
              String message =
                  String.format(
                      "\n\u001B[33mA new version of Jib CLI (%s) is available (currently using %s). Download the latest"
                          + " Jib CLI version from %s\n%s\u001B[0m\n\nPlease see %s for info on disabling this update check.\n",
                      latestVersion,
                      VersionInfo.getVersionSimple(),
                      cliReleaseUrl,
                      changelogUrl,
                      privacyUrl);
              logger.log(LogEvent.Level.LIFECYCLE, message);
            });
  }
@Test
  public void testFinishUpdateChecker_correctMessageLogged() {
    Future<Optional<String>> updateCheckFuture = Futures.immediateFuture(Optional.of("2.0.0"));
    JibCli.finishUpdateChecker(logger, updateCheckFuture);
    verify(logger)
        .log(
            eq(LogEvent.Level.LIFECYCLE),
            contains(
                "A new version of Jib CLI (2.0.0) is available (currently using "
                    + VersionInfo.getVersionSimple()
                    + "). Download the latest Jib CLI version from "
                    + ProjectInfo.GITHUB_URL
                    + "/releases/tag/v2.0.0-cli"));
  }