@Override
      public AppResult getAnalysis() throws Exception {
        if (_sleepBeforeAnalysis) {
          try {
            Thread.sleep(5000L);
          } catch (InterruptedException e) {
            // Ignore and continue with analysis.
          }
        }
        AppResult result = new AppResult();
        result.id = getAppId();
        result.finishTime = getFinishTime() <= 0 ? _finishTimeAfterAnalysis : getFinishTime();
        result.jobName = getName();
        result.queueName = getQueueName();
        result.trackingUrl = getTrackingUrl() == null ? "" : getTrackingUrl();
        result.name = getName();
        result.username = getUser();
        result.startTime = getStartTime();
        List<JobType> jobTypes = ElephantContext.instance().getAppTypeToJobTypes().get(getAppType());
        result.jobType = ((jobTypes == null) ? "" :  jobTypes.get(0).getName());
        result.severity = Severity.LOW;
        result.score = 100;
        result.workflowDepth = 1;
        result.scheduler = "Azkaban";
        result.jobExecId = Utils.getJobIdFromApplicationId(getAppId());
        result.flowExecId = "flow_123";
        result.jobDefId = "job_def_123";
        result.flowDefId = "flow_def_123";
        result.jobExecUrl = "job_url";
        result.flowExecUrl = "flow_url";
        result.jobDefUrl = "job_def_url";
        result.flowDefUrl = "flow_def_url";
        // Wait for execution priority to be set, if not already set, to avoid race.
        int loopCount = 400;
        while (getJobExecutionPriority() == Priority.MIN_PRIORITY && loopCount > 0) {
          try {
            Thread.sleep(50);
          } catch (InterruptedException e) {
            // Ignore.
          }
          loopCount--;
        }
        _appsToPriorityMap.put(getAppId(), getJobExecutionPriority());
        return result;
      }
Tests backfilling of jobs when Dr.Elephant comes up.
test/com/linkedin/drelephant/BackfillTest.java