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

  when(accessController.hasPermission(credentials, viewThreatIntelFact)).thenReturn(false);
  context.checkReadPermission(new FactEntity().setAccessMode(AccessMode.Public));
}