@Test
public void printJob() throws Exception {

    final String jobId = UUID.randomUUID().toString();
    final String statusMessage = UUID.randomUUID().toString();
    final ByteArrayOutputStream out = new ByteArrayOutputStream();
    final GlacierJobDescription job = new GlacierJobDescription();
    job.setJobId(jobId);
    job.setCompleted(true);
    final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
    dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
    job.setCompletionDate(dateFormat.format(new Date(0)));
    job.setStatusCode(StatusCode.Succeeded);
    job.setStatusMessage(statusMessage);
    new JobPrinter().printJob(job, out);
    assertEquals("Job ID:\t\t\t\t" + jobId + LINE_SEPARATOR +
            "Creation date:\t\t\tnull" + LINE_SEPARATOR +
            "Completion date:\t1970-01-01 00:00:00" + LINE_SEPARATOR +
            "Status:\t\t\t\tSucceeded (" + statusMessage + ")" + LINE_SEPARATOR +
            LINE_SEPARATOR, out.toString());
}