@Test
public void testCreateFact() throws Exception {

  UUID id = UUID.randomUUID();
  when(getTiService().createFact(any(), isA(CreateFactRequest.class))).then(i -> Fact.builder().setId(id).build());
  Response response = target("/v1/fact").request().post(Entity.json(createCreateFactRequest()));
  assertEquals(201, response.getStatus());
  assertEquals(id.toString(), getPayload(response).get("id").textValue());
  verify(getTiService(), times(1)).createFact(notNull(), isA(CreateFactRequest.class));
}