ApplicationEntity extends HierarchicalTimelineEntity { public static boolean isApplicationEntity(TimelineEntity te) { return (te == null ? false : te.getType().equals(TimelineEntityType.YARN_APPLICATION.toString())); } ApplicationEntity();  ApplicationEntity(TimelineEntity entity); String getQueue(); void setQueue(String queue); static boolean isApplicationEntity(TimelineEntity te); static TimelineEvent getApplicationEvent(TimelineEntity te,
      String eventId); static final String QUEUE_INFO_KEY; }
@Test void testIsApplicationEntity() { TimelineEntity te = new TimelineEntity(); te.setType(TimelineEntityType.YARN_APPLICATION.toString()); assertTrue(ApplicationEntity.isApplicationEntity(te)); te = null; assertEquals(false, ApplicationEntity.isApplicationEntity(te)); te = new TimelineEntity(); te.setType(TimelineEntityType.YARN_CLUSTER.toString()); assertEquals(false, ApplicationEntity.isApplicationEntity(te)); }