@Test
    public void testOverloadMethodCache() {
        final String key = TestInterface2.class.getCanonicalName();
        final Method method1 = ReflectUtils.getMethod(TestInterface2.class, "invoke", SofaRequest.class);
        final Method method2 = ReflectUtils.getMethod(TestInterface2.class, "invoke", SofaRequest.class, String.class);
        Assert.assertNull(ReflectCache.getOverloadMethodCache(key, "invoke",
            new String[] { SofaRequest.class.getCanonicalName(), String.class.getCanonicalName() }));
        Assert.assertNull(ReflectCache.getOverloadMethodCache(key, "invoke",
            new String[] { SofaRequest.class.getCanonicalName() }));

        ReflectCache.putOverloadMethodCache(key, method1);
        ReflectCache.putOverloadMethodCache(key, method2);
        Assert.assertEquals(method1, ReflectCache.getOverloadMethodCache(key, "invoke",
            new String[] { SofaRequest.class.getCanonicalName() }));
        Assert.assertEquals(method2, ReflectCache.getOverloadMethodCache(key, "invoke",
            new String[] { SofaRequest.class.getCanonicalName(), String.class.getCanonicalName() }));

        ReflectCache.invalidateOverloadMethodCache(key);
        Assert.assertNull(ReflectCache.NOT_OVERLOAD_METHOD_CACHE.get(key));
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/api/src/test/java/com/alipay/sofa/rpc/common/cache/ReflectCacheTest.java