@Test
public void testCheckReadPermissionWithAccessModeRoleBased() throws Exception {

  FactEntity fact = new FactEntity()
          .setOrganizationID(UUID.randomUUID())
          .setAccessMode(AccessMode.RoleBased);
  when(accessController.hasPermission(credentials, viewThreatIntelFact, organization)).thenReturn(true);
  context.checkReadPermission(fact);
  verify(accessController).hasPermission(credentials, viewThreatIntelFact, organization);
}