### Question:
DefaultFuture implements ResponseFuture { @Override public boolean isDone() { return response != null; } private  DefaultFuture(Channel channel, Request request, int timeout); static DefaultFuture newFuture(Channel channel, Request request, int timeout); static DefaultFuture getFuture(long id); static boolean hasFuture(Channel channel); static void sent(Channel channel, Request request); static void closeChannel(Channel channel); static void received(Channel channel, Response response); @Override Object get(); @Override Object get(int timeout); void cancel(); @Override boolean isDone(); @Override void setCallback(ResponseCallback callback); Request getRequest(); static final Timer TIME_OUT_TIMER; }### Answer:
@Test public void isDone() { DefaultFuture future = defaultFuture(3000); Assertions.assertTrue(!future.isDone(), "init future is finished!"); future.cancel(); Assertions.assertTrue(future.isDone(), "cancel a future failed!"); }