@Test
public void shouldNotifyDCListener() {

  CompletableFuture<QueryLog> logF = new CompletableFuture<>();
  CompletableFuture<BoundNode> nodeF = new CompletableFuture<>();
  dc.registerQueryListener(
      (n, l) -> {
        nodeF.complete(n);
        logF.complete(l);
      });
  Query query = new Query("select * from table1");
  Frame request = FrameUtils.wrapRequest(query);
  loggedChannel.writeInbound(request);
  loggedChannel.readInbound();
  assertThat(CompletableFutures.getUninterruptibly(logF, 5, TimeUnit.SECONDS).getQuery())
      .isEqualTo(query.query);
  assertThat(CompletableFutures.getUninterruptibly(nodeF, 5, TimeUnit.SECONDS))
      .isEqualTo(loggedNode);
}