public TimelineEntity getEntity(
      String entityType,
      String entityId,
      EnumSet<Field> fields,
      UserGroupInformation callerUGI) throws YarnException, IOException {
    long startTime = Time.monotonicNow();
    metrics.incrGetEntityOps();
    try {
      return doGetEntity(entityType, entityId, fields, callerUGI);
    } finally {
      metrics.addGetEntityTime(Time.monotonicNow() - startTime);
    }
  }
@Test
  void testGetOldEntityWithOutDomainId() throws Exception {
    TimelineEntity entity = dataManaer.getEntity(
        "OLD_ENTITY_TYPE_1", "OLD_ENTITY_ID_1", null,
        UserGroupInformation.getCurrentUser());
    assertNotNull(entity);
    assertEquals("OLD_ENTITY_ID_1", entity.getEntityId());
    assertEquals("OLD_ENTITY_TYPE_1", entity.getEntityType());
    assertEquals(
        TimelineDataManager.DEFAULT_DOMAIN_ID, entity.getDomainId());
  }