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

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