@Test
public void testDeleteOrigin() throws Exception {

  UUID id = UUID.randomUUID();
  when(getTiService().deleteOrigin(any(), isA(DeleteOriginRequest.class))).then(i -> {
    assertEquals(id, i.<DeleteOriginRequest>getArgument(1).getId());
    return Origin.builder().setId(id).build();
  });
  Response response = target(String.format("/v1/origin/uuid/%s", id)).request().delete();
  assertEquals(200, response.getStatus());
  assertEquals(id.toString(), getPayload(response).get("id").textValue());
  verify(getTiService(), times(1)).deleteOrigin(notNull(), isA(DeleteOriginRequest.class));
}