@VisibleForTesting
  final void dumpImpl(PrintWriter writer) {
    synchronized (runningJobs) {
      if (runningJobs.isEmpty()) {
        writer.println("No running jobs");
        return;
      }

      long now = SystemClock.elapsedRealtime();

      writer.println("Running jobs:");
      for (int i = 0; i < runningJobs.size(); i++) {
        JobCallback callback = runningJobs.get(runningJobs.keyAt(i));

        // Add sanitized quotes around the tag to make this easier to parse for robots
        String name = JSONObject.quote(callback.job.getTag());
        // Produces strings like "02:30"
        String duration =
            DateUtils.formatElapsedTime(MILLISECONDS.toSeconds(now - callback.startedAtElapsed));

        writer.println("    * " + name + " has been running for " + duration);
      }
    }
  }
Package-private alias for {@link #dump(FileDescriptor, PrintWriter, String[])}.

<p>The {@link #dump(FileDescriptor, PrintWriter, String[])} method is protected. This
implementation method is marked package-private to facilitate testing.
jobdispatcher/src/main/java/com/firebase/jobdispatcher/JobService.java