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

  UUID id = UUID.randomUUID();
  FactRecord record = new FactRecord();
  when(factRequestResolver.resolveFact(id)).thenReturn(record);
  doThrow(AccessDeniedException.class).when(securityContext).checkReadPermission(record);
  delegate.handle(new GetFactByIdRequest().setId(id));
}