@Test
public void testGrantFactAccessToPublicFact() throws Exception {

  GrantFactAccessRequest request = createGrantAccessRequest();
  when(factRequestResolver.resolveFact(request.getFact())).thenReturn(new FactRecord().setAccessMode(FactRecord.AccessMode.Public));
  InvalidArgumentException ex = assertThrows(InvalidArgumentException.class, () -> delegate.handle(request));
  assertEquals(set("fact.is.public"), set(ex.getValidationErrors(), InvalidArgumentException.ValidationError::getMessageTemplate));
}