@Test
public void testCreateMetaFact() throws Exception {

  UUID oldFact = UUID.randomUUID();
  UUID newFact = UUID.randomUUID();
  when(getTiService().createMetaFact(any(), isA(CreateMetaFactRequest.class))).then(i -> {
    assertEquals(oldFact, i.<CreateMetaFactRequest>getArgument(1).getFact());
    return Fact.builder().setId(newFact).build();
  });
  Response response = target(String.format("/v1/fact/uuid/%s/meta", oldFact)).request().post(Entity.json(createCreateMetaFactRequest()));
  assertEquals(201, response.getStatus());
  assertEquals(newFact.toString(), getPayload(response).get("id").textValue());
  verify(getTiService(), times(1)).createMetaFact(notNull(), isA(CreateMetaFactRequest.class));
}