@Test(expected = AccessDeniedException.class)
public void testFetchObjectTypesWithoutPermission() throws Exception {

  doThrow(AccessDeniedException.class).when(securityContext).checkPermission(TiFunctionConstants.viewThreatIntelType);
  delegate.handle(new SearchObjectTypeRequest());
}