@Test
public void testGenerateFileNameInProgressJob() {

  String appId = "app123";
  long started = 1L;
  String user = "user";
  JobMetadata metadata = new JobMetadata.Builder()
      .setId(appId)
      .setStarted(started)
      .setUser(user)
      .setConf(new YarnConfiguration())
      .build();
  String expectedName = "app123-1-user." + Constants.HISTFILE_SUFFIX + "." + Constants.INPROGRESS;
  assertEquals(HistoryFileUtils.generateFileName(metadata), expectedName);
}