@Test
public void testGetOldEntitiesWithOutDomainId() throws Exception {

  TimelineEntities entities = dataManaer.getEntities(
      "OLD_ENTITY_TYPE_1", null, null, null, null, null, null, null, null,
      UserGroupInformation.getCurrentUser());
  Assert.assertEquals(2, entities.getEntities().size());
  Assert.assertEquals("OLD_ENTITY_ID_2",
      entities.getEntities().get(0).getEntityId());
  Assert.assertEquals("OLD_ENTITY_TYPE_1",
      entities.getEntities().get(0).getEntityType());
  Assert.assertEquals(TimelineDataManager.DEFAULT_DOMAIN_ID,
      entities.getEntities().get(0).getDomainId());
  Assert.assertEquals("OLD_ENTITY_ID_1",
      entities.getEntities().get(1).getEntityId());
  Assert.assertEquals("OLD_ENTITY_TYPE_1",
      entities.getEntities().get(1).getEntityType());
  Assert.assertEquals(TimelineDataManager.DEFAULT_DOMAIN_ID,
      entities.getEntities().get(1).getDomainId());
}