code: @Override
      public String formatReport(final JobReport jobReport) {
          Template template = velocityEngine.getTemplate("/org/easybatch/tools/reporting/HtmlReport.vm");
          StringWriter stringWriter = new StringWriter();
          Context context = new VelocityContext();
          context.put("report", jobReport);
  
          /*
           * Job name and status
           */
          context.put("name",jobReport.getJobName());
          context.put("status",jobReport.getStatus());
  
          /*
           * Job parameters
           */
          JobParameters parameters = jobReport.getParameters();
          context.put("batchSize",parameters.getBatchSize());
          context.put("errorThreshold", formatErrorThreshold(parameters.getErrorThreshold()));
          context.put("jmx",parameters.isJmxMonitoring());
  
          /*
           * Job metrics
           */
          JobMetrics metrics = jobReport.getMetrics();
          context.put("startTime",formatTime(metrics.getStartTime()));
          context.put("endTime",formatTime(metrics.getEndTime()));
          context.put("duration",formatDuration(metrics.getDuration()));
          context.put("readCount",metrics.getReadCount());
          context.put("writeCount",metrics.getWriteCount());
          context.put("filterCount",metrics.getFilterCount());
          context.put("errorCount",metrics.getErrorCount());
          context.put("customMetrics",metrics.getCustomMetrics());
  
          /*
           * System properties
           */
          context.put("systemProperties", new TreeMap<>(jobReport.getSystemProperties()));
          // properties are wrapped in a tree map for sorting purpose (repeatable tests)
  
          template.merge(context, stringWriter);
          return stringWriter.toString();
      }
docs: {@inheritDoc}