@Test
public void testCheckPermissionForOrganizationWithAccess() throws Exception {

  UUID organizationID = UUID.randomUUID();
  when(identityResolver.resolveOrganizationIdentity(organizationID)).thenReturn(organization);
  when(accessController.hasPermission(credentials, viewThreatIntelFact, organization)).thenReturn(true);
  context.checkPermission(viewThreatIntelFact, organizationID);
  verify(accessController).hasPermission(credentials, viewThreatIntelFact, organization);
}