@Test
public void testTraverseObjectByTypeValue() throws Exception {

  String type = "ip";
  String value = "27.13.4.125";
  when(getTiService().traverseGraph(any(), isA(TraverseByObjectTypeValueRequest.class))).then(i -> {
    TraverseByObjectTypeValueRequest request = i.getArgument(1);
    assertEquals(type, request.getType());
    assertEquals(value, request.getValue());
    return StreamingResultSet.<String>builder().setValues(ListUtils.list("something")).build();
  });
  TraverseByObjectTypeValueRequest request = new TraverseByObjectTypeValueRequest()
          .setQuery("g.values('value')");
  Response response = target(String.format("/v1/object/%s/%s/traverse", type, value)).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(TraverseByObjectTypeValueRequest.class));
}