@Test
public void testBindValue() throws Exception {

    Query delegate = mock(Query.class);
    QueryFacade<Query, Session> facade = getFacade(delegate);
    CompletableFuture<Map.Entry<String, Value>> latch = new CompletableFuture<>();
    doAnswer(invoked -> latch.complete(Fun.toEntry(invoked.getArgument(0), invoked.getArgument(1))))
            .when(delegate).bindValue(anyString(), any(Value.class));
    final String varName = "foo";
    final Value value = mock(Value.class);
    facade.bindValue(varName, value);
    final Map.Entry<String, Value> fromLatch = latch.getNow(Fun.toEntry("", mock(Value.class)));
    assertSame("same key in latch", varName, fromLatch.getKey());
    assertSame("same value in latch", value, fromLatch.getValue());
}