@Test
public void testCreateFactType() throws Exception {

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