### Question:
ClientConfigHelper { public Map<String, ConsumerGroupVo> getConfig() { try { InputStream inputStream = getConfigFileStream(); return getConfig(inputStream); } catch (Exception ex) { log.error("加载配置文件异常，异常信息：" + ex.getMessage(), ex); throw new RuntimeException(ex); } } ClientConfigHelper(MqContext mqContext);  ClientConfigHelper(); Map<String, ConsumerGroupVo> getConfig(); static Map<String, ConsumerGroupVo> getConfig(String xml);  }### Answer:
@Test public void getConfigTest() { ClientConfigHelper clientConfigHelper = new ClientConfigHelper(new MqContext()); Map<String, ConsumerGroupVo> maps = clientConfigHelper.getConfig(); assertEquals("messageQueue.xml 解析数量不对！", 1, maps.size()); assertEquals("topic 解析数量不对！", 1, maps.get("testSub").getTopics().size()); }
@Test public void getConfigXmlTest() { try { Map<String, ConsumerGroupVo> maps = ClientConfigHelper.getConfig(consumerError); assertEquals("consumerError 解析异常", 1, maps.size()); } catch (Exception e) { } try { Map<String, ConsumerGroupVo> maps = ClientConfigHelper.getConfig(consumerGroupError); assertEquals("consumerGroupError 解析异常", 1, maps.size()); } catch (Exception e) { } try { Map<String, ConsumerGroupVo> maps = ClientConfigHelper.getConfig(consumerGroupTopicEmptyError); assertEquals("consumerGroupTopicEmptyError 解析异常", 1, maps.size()); } catch (Exception e) { } try { Map<String, ConsumerGroupVo> maps = ClientConfigHelper.getConfig(consumerTopicNameError); assertEquals("consumerTopicNameError 解析异常", 1, maps.size()); } catch (Exception e) { } try { Map<String, ConsumerGroupVo> maps = ClientConfigHelper.getConfig(receiverTypeError); assertEquals("receiverTypeError 解析异常", 1, maps.size()); } catch (Exception e) { } try { Map<String, ConsumerGroupVo> maps = ClientConfigHelper.getConfig(receiverNotExistTypeError); assertEquals("receiverNotExistTypeError 解析异常", 1, maps.size()); } catch (Exception e) { } try { Map<String, ConsumerGroupVo> maps = ClientConfigHelper.getConfig(noReceiverTypeError); assertEquals("noReceiverTypeError 解析异常", 1, maps.size()); } catch (Exception e) { } Map<String, ConsumerGroupVo> maps = ClientConfigHelper.getConfig(twoConsumerGroups); assertEquals("twoConsumerGroups 解析异常", 2, maps.size()); maps = ClientConfigHelper.getConfig(twoConsumerGroups1); assertEquals("twoConsumerGroups1 解析异常", 2, maps.size()); assertEquals(null, ClientConfigHelper.getConfig(null)); boolean rs=false; try { ClientConfigHelper.getConfig("tete"); } catch (Exception e) { rs=true; } assertEquals(true, rs); }