public static boolean isApplicationEntity(TimelineEntity te) {
    return (te == null ? false
        : te.getType().equals(TimelineEntityType.YARN_APPLICATION.toString()));
  }
@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));
  }