@Test
public void testSearchFactsUnlimited() throws Exception {

  mockSearch(10001);
  FactSearchCriteria criteria = createFactSearchCriteria(b -> b.setLimit(0));
  ResultSet<Fact> result = handler.search(criteria, null);
  assertEquals(0, result.getLimit());
  assertEquals(10001, result.getCount());
  assertEquals(10001, ListUtils.list(result.iterator()).size());
  verify(securityContext).checkPermission(TiFunctionConstants.unlimitedThreatIntelSearch);
}