}
}
@Test
public void shouldReturnInvalidRequestArgsWhenInvalidBindingKeyIsUsed() throws Exception {
try (SimpleClient client = new WebSocketClient()) {
final Map<String,Object> bindings = new HashMap<>();
bindings.put(T.id.getAccessor(), "123");
final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL)
.addArg(Tokens.ARGS_GREMLIN, "[1,2,3,4,5,6,7,8,9,0]")
.addArg(Tokens.ARGS_BINDINGS, bindings).create();
final CountDownLatch latch = new CountDownLatch(1);
final AtomicBoolean pass = new AtomicBoolean(false);
client.submit(request, result -> {
if (result.getStatus().getCode() != ResponseStatusCode.SUCCESS_TERMINATOR) {
pass.set(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS == result.getStatus().getCode());
latch.countDown();
}
});