@Test
public void testGrantFactAccessSubjectNotFound() throws Exception {

  GrantFactAccessRequest request = createGrantAccessRequest();
  when(factRequestResolver.resolveFact(request.getFact())).thenReturn(new FactRecord());
  InvalidArgumentException ex = assertThrows(InvalidArgumentException.class, () -> delegate.handle(request));
  assertEquals(set("subject.not.exist"), set(ex.getValidationErrors(), InvalidArgumentException.ValidationError::getMessageTemplate));
  verify(subjectResolver).resolveSubject(request.getSubject());
}