@Test
public void testCheckPermissionWithAccess() throws Exception {

  when(accessController.hasPermission(credentials, viewThreatIntelFact)).thenReturn(true);
  context.checkPermission(viewThreatIntelFact);
  verify(accessController).hasPermission(credentials, viewThreatIntelFact);
}