@Test
public void testTraverseObjectById() throws Exception {

  UUID id = UUID.randomUUID();
  when(getTiService().traverseGraph(any(), isA(TraverseByObjectIdRequest.class))).then(i -> {
    assertEquals(id, i.<TraverseByObjectIdRequest>getArgument(1).getId());
    return StreamingResultSet.<String>builder().setValues(ListUtils.list("something")).build();
  });
  TraverseByObjectIdRequest request = new TraverseByObjectIdRequest()
          .setQuery("g.values('value')");
  Response response = target(String.format("/v1/object/uuid/%s/traverse", id)).request().post(Entity.json(request));
  JsonNode payload = getPayload(response);
  assertEquals(200, response.getStatus());
  assertTrue(payload.isArray());
  assertEquals(1, payload.size());
  assertEquals("something", payload.get(0).asText());
  verify(getTiService(), times(1)).traverseGraph(notNull(), isA(TraverseByObjectIdRequest.class));
}