### Question:
StaticChannelPipeline implements ChannelPipeline { public Map<String, ChannelHandler> toMap() { Map<String, ChannelHandler> map = new LinkedHashMap<String, ChannelHandler>(); for (StaticChannelHandlerContext ctx: contexts) { map.put(ctx.getName(), ctx.getHandler()); } return map; } StaticChannelPipeline(ChannelHandler... handlers); ChannelFuture execute(Runnable task); Channel getChannel(); ChannelSink getSink(); void attach(Channel channel, ChannelSink sink); boolean isAttached(); void addFirst(String name, ChannelHandler handler); void addLast(String name, ChannelHandler handler); void addBefore(String baseName, String name, ChannelHandler handler); void addAfter(String baseName, String name, ChannelHandler handler); void remove(ChannelHandler handler); ChannelHandler remove(String name); T remove(Class<T> handlerType); ChannelHandler removeFirst(); ChannelHandler removeLast(); void replace(ChannelHandler oldHandler, String newName, ChannelHandler newHandler); ChannelHandler replace(String oldName, String newName, ChannelHandler newHandler); T replace(
            Class<T> oldHandlerType, String newName, ChannelHandler newHandler); ChannelHandler getFirst(); ChannelHandler getLast(); ChannelHandler get(String name); T get(Class<T> handlerType); ChannelHandlerContext getContext(String name); ChannelHandlerContext getContext(ChannelHandler handler); ChannelHandlerContext getContext(Class<? extends ChannelHandler> handlerType); List<String> getNames(); Map<String, ChannelHandler> toMap(); @Override String toString(); void sendUpstream(ChannelEvent e); void sendDownstream(ChannelEvent e);  }### Answer:
@Test public void testConstructionWithNull1() { StaticChannelPipeline p = new StaticChannelPipeline(null, new A(), new B()); Map<String, ChannelHandler> m = p.toMap(); Assert.assertEquals(0, m.size()); }