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

  SearchMetaFactsRequest request = new SearchMetaFactsRequest().setFact(UUID.randomUUID());
  when(factRequestResolver.resolveFact(request.getFact())).thenReturn(new FactRecord());
  doThrow(AccessDeniedException.class).when(securityContext).checkReadPermission(isA(FactRecord.class));
  delegate.handle(request);
}