@Test
public void createFirstErrorMessage() throws Exception {

  setJobStatus(Status.FAILED);
  // TODO ypadron: implement ability to mock current time in java.time api and remove setEndTime()
  this.executableFlow.setEndTime(END_TIME_MILLIS);
  this.executableFlow.setStatus(Status.FAILED_FINISHING);
  assertTrue(this.mailCreator.createFirstErrorMessage(
      this.executableFlow, this.message, this.azkabanName, this.scheme, this.clientHostname,
      this.clientPortNumber));
  assertEquals("Flow 'mail-creator-test' has encountered a failure on unit-tests",
      this.message.getSubject());
  assertThat(TestUtils.readResource("firstErrorMessage.html", this))
      .isEqualToIgnoringWhitespace(this.message.getBody());
}