public static Method getter(Class<?> o, String propertiesName) {
        if (o == null) {
            return null;
        }
        try {
            PropertyDescriptor descriptor = new PropertyDescriptor(propertiesName, o);
            return descriptor.getReadMethod();
        } catch (IntrospectionException e) {
            throw new RuntimeException("not find getter for" + propertiesName + "in" + o.getName(), e);
        }
    }
@Test
    public void testGetter() {
        Method name = BeanUtil.getter(Customer.class, "name");
        Assert.assertEquals("getName", name.getName());
    }