@Test
public void testGetMethod() throws Exception {

    String className = "com.alipay.sofa.rpc.common.utils.TestBean";
    String methodName = "setAlias";
    String[] argsType1 = new String[] { "java.lang.String" };
    Method method = ReflectUtils.getMethod(className, methodName, argsType1);
    Method method3 = ClassUtils.forName(className).getMethod(methodName,
        ClassTypeUtils.getClasses(argsType1));
    Assert.assertFalse(method == method3);
    Assert.assertTrue(method.equals(method3));
    Method method4 = ReflectUtils.getMethod(TestBean.class, "setAlias", String.class);
    Assert.assertFalse(method == method4);
    Assert.assertTrue(method3.equals(method4));
    boolean error = false;
    try {
        ReflectUtils.getMethod(className, methodName + "xxx", argsType1);
    } catch (Exception e) {
        error = true;
    }
    Assert.assertTrue(error);
}