@Test
public void testGetEntitiesAclEnabled() throws Exception {

  AdminACLsManager oldAdminACLsManager =
    aclsManager.setAdminACLsManager(adminACLsManager);
  try {
    TimelineEntities entities = dataManaer.getEntities(
      "ACL_ENTITY_TYPE_1", null, null, null, null, null, null, 1l, null,
      UserGroupInformation.createUserForTesting("owner_1", new String[] {"group1"}));
    Assert.assertEquals(1, entities.getEntities().size());
    Assert.assertEquals("ACL_ENTITY_ID_11",
      entities.getEntities().get(0).getEntityId());
  } finally {
    aclsManager.setAdminACLsManager(oldAdminACLsManager);
  }
}