public void testFailedPipelineInitialization() throws Exception {
ClientBootstrap bootstrap = new ClientBootstrap(createMock(ChannelFactory.class));
ChannelPipelineFactory pipelineFactory = createMock(ChannelPipelineFactory.class);
bootstrap.setPipelineFactory(pipelineFactory);
expect(pipelineFactory.getPipeline()).andThrow(new ChannelPipelineException());
replay(pipelineFactory);
ChannelFuture future = bootstrap.connect(new InetSocketAddress(TestUtil.getLocalHost(), 1));
future.awaitUninterruptibly();
bootstrap.shutdown();