### Question:
HttpChunkAggregator extends SimpleChannelUpstreamHandler implements LifeCycleAwareChannelHandler { public final void setMaxCumulationBufferComponents(int maxCumulationBufferComponents) { if (maxCumulationBufferComponents < 2) { throw new IllegalArgumentException( "maxCumulationBufferComponents: " + maxCumulationBufferComponents + " (expected: >= 2)"); } if (ctx == null) { this.maxCumulationBufferComponents = maxCumulationBufferComponents; } else { throw new IllegalStateException( "decoder properties cannot be changed once the decoder is added to a pipeline."); } } HttpChunkAggregator(int maxContentLength); final int getMaxCumulationBufferComponents(); final void setMaxCumulationBufferComponents(int maxCumulationBufferComponents); @Override void messageReceived(ChannelHandlerContext ctx, MessageEvent e); void beforeAdd(ChannelHandlerContext ctx); void afterAdd(ChannelHandlerContext ctx); void beforeRemove(ChannelHandlerContext ctx); void afterRemove(ChannelHandlerContext ctx); static final int DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS; }### Answer:
@Test(expected = IllegalArgumentException.class) public void testInvalidMaxCumulationBufferComponents() { HttpChunkAggregator aggr= new HttpChunkAggregator(Integer.MAX_VALUE); aggr.setMaxCumulationBufferComponents(1); }