### Question:
HttpServer { public void registerCommands(Map<String, CommandHandler> handlerMap) { if (handlerMap != null) { for (Entry<String, CommandHandler> e : handlerMap.entrySet()) { registerCommand(e.getKey(), e.getValue()); } } }  void start(); void close(); void registerCommand(String commandName, CommandHandler handler); void registerCommands(Map<String, CommandHandler> handlerMap);  }### Answer:
@Test public void testRegisterCommands() { Map<String, CommandHandler> handlerMap = null; httpServer.registerCommands(handlerMap); assertEquals(0, HttpServer.handlerMap.size()); handlerMap = CommandHandlerProvider.getInstance().namedHandlers(); httpServer.registerCommands(handlerMap); assertEquals(handlerMap.size(), HttpServer.handlerMap.size()); assertTrue(handlerMap != HttpServer.handlerMap); }