@Test
public void testCreateOrigin() throws Exception {

  UUID id = UUID.randomUUID();
  when(getTiService().createOrigin(any(), isA(CreateOriginRequest.class))).then(i -> Origin.builder().setId(id).build());
  Response response = target("/v1/origin").request().post(Entity.json(new CreateOriginRequest().setName("name")));
  assertEquals(201, response.getStatus());
  assertEquals(id.toString(), getPayload(response).get("id").textValue());
  verify(getTiService(), times(1)).createOrigin(notNull(), isA(CreateOriginRequest.class));
}