### Question:
CompositeChannelFuture extends DefaultChannelFuture { @Override public boolean isSuccess() { if (super.isSuccess()) { return true; } boolean result = this.allTrue(new CompositeTrue() { @Override public boolean isTrue(ChannelFuture f) { return f.isSuccess(); } }); return result; } CompositeChannelFuture(Channel channel, Collection<E> kids);  CompositeChannelFuture(Channel channel, Collection<E> kids, boolean failFast); @Override Throwable getCause(); @Override boolean isSuccess(); @Override boolean isDone(); @Override String toString();  }### Answer:
@Test public void shouldBeSucceededAfterConstructionWithAllKidsSucceeded() throws Exception { final ChannelFuture future1 = context.mock(ChannelFuture.class, "future1"); final ChannelFuture future2 = context.mock(ChannelFuture.class, "future2"); Collection<ChannelFuture> futures = Arrays.asList(future1, future2); context.checking(new Expectations() { { oneOf(future1).addListener(with(any(ChannelFutureListener.class))); will(callChannelFutureListener(future1)); oneOf(future2).addListener(with(any(ChannelFutureListener.class))); will(callChannelFutureListener(future2)); oneOf(future1).isSuccess(); will(returnValue(true)); oneOf(future1).isCancelled(); will(returnValue(false)); oneOf(future2).isSuccess(); will(returnValue(true)); oneOf(future2).isCancelled(); will(returnValue(false)); } }); CompositeChannelFuture<ChannelFuture> composite = new CompositeChannelFuture<ChannelFuture>(channel, futures); assertTrue(composite.isSuccess()); }