CompletableFutureInboundDataClient implements InboundDataClient { @Override public void complete() { future.complete(COMPLETED); } private  CompletableFutureInboundDataClient(CompletableFuture<Object> future); static InboundDataClient create(); @Override void awaitCompletion(); @Override boolean isDone(); @Override void cancel(); @Override void complete(); @Override void fail(Throwable t);  }
@Test public void testComplete() throws Exception { InboundDataClient client = CompletableFutureInboundDataClient.create(); assertThat(client.isDone(), is(false)); client.complete(); assertThat(client.isDone(), is(true)); client.awaitCompletion(); }