@Test
public void parseMethodInfo() throws Exception {

    // 不用测试null等情况，
    Map<String, Object> map = new HashMap<String, Object>();
    SofaRegistryHelper.parseMethodInfo(map, "xx", "[]");
    Assert.assertTrue(map.size() == 0);
    map.clear();
    SofaRegistryHelper.parseMethodInfo(map, "xx", "[xxxx]");
    Assert.assertTrue(map.size() == 0);
    map.clear();
    SofaRegistryHelper.parseMethodInfo(map, "xx", "[clientTimeout#5555]");
    Assert.assertTrue(map.size() == 1);
    Assert.assertTrue(5555 == (Integer) map.get(".xx.timeout"));
    map.clear();
    SofaRegistryHelper.parseMethodInfo(map, "xx", "[_AUTORECONNECT#false@_TIMEOUT#2000]");
    Assert.assertTrue(map.size() == 2);
    Assert.assertTrue(2000 == (Integer) map.get(".xx.timeout"));
    Assert.assertTrue("false".equals(map.get(".xx._AUTORECONNECT")));
    map.clear();
    SofaRegistryHelper.parseMethodInfo(map, "xx", "[clientTimeout#4444@retries#3]");
    Assert.assertTrue(map.size() == 2);
    Assert.assertTrue(4444 == (Integer) map.get(".xx.timeout"));
    Assert.assertTrue("3".equals(map.get(".xx.retries")));
}