@Test
void testGetApplicationEvent() {

  TimelineEntity te = null;
  TimelineEvent tEvent = ApplicationEntity.getApplicationEvent(te,
      "no event");
  assertEquals(null, tEvent);
  te = new TimelineEntity();
  te.setType(TimelineEntityType.YARN_APPLICATION.toString());
  TimelineEvent event = new TimelineEvent();
  event.setId("start_event");
  event.setTimestamp(System.currentTimeMillis());
  te.addEvent(event);
  tEvent = ApplicationEntity.getApplicationEvent(te, "start_event");
  assertEquals(event, tEvent);
  te = new TimelineEntity();
  te.setType(TimelineEntityType.YARN_CLUSTER.toString());
  event = new TimelineEvent();
  event.setId("start_event_cluster");
  event.setTimestamp(System.currentTimeMillis());
  te.addEvent(event);
  tEvent = ApplicationEntity.getApplicationEvent(te, "start_event_cluster");
  assertEquals(null, tEvent);
}