private void tryRestGremlin() throws Exception {
String traversal = traversals[0];
for (int iy = 1; iy < 26; iy++) {
final String url = getHttpBaseUri() + "graphs/gratefulgraph/tp/gremlin?script=" + URLEncoder.encode(traversal) + "&rexster.offset.end=" + Long.MAX_VALUE + "¶ms.x=";
final ClientRequest request = ClientRequest.create().build(URI.create(url + String.valueOf(iy * 8)), "GET");
final ClientResponse response = httpClient.handle(request);
final JSONObject json = response.getEntity(JSONObject.class);
Assert.assertTrue(json.optBoolean("success"));
}
traversal = traversals[1];
for (int ix = 0; ix < 25; ix++) {
final String url = getHttpBaseUri() + "graphs/gratefulgraph/tp/gremlin?script=" + URLEncoder.encode(traversal) + "&rexster.offset.end=" + Long.MAX_VALUE + "¶ms.x=";
final ClientRequest request = ClientRequest.create().build(URI.create(url + String.valueOf(artists[ix])), "GET");
final ClientResponse response = httpClient.handle(request);
final JSONObject json = response.getEntity(JSONObject.class);
Assert.assertTrue(json.optBoolean("success"));
}
traversal = traversals[2];
for (int ix = 100; ix < 125; ix++) {
final String url = getHttpBaseUri() + "graphs/gratefulgraph/tp/gremlin?script=" + URLEncoder.encode(traversal) + "&rexster.offset.end=" + Long.MAX_VALUE + "¶ms.x=";
final ClientRequest request = ClientRequest.create().build(URI.create(url + String.valueOf(songs[ix])), "GET");
final ClientResponse response = httpClient.handle(request);
final JSONObject json = response.getEntity(JSONObject.class);
Assert.assertTrue(json.optBoolean("success"));
}
}