@Test
public void testGetPropertySetterMethod() throws Exception {

    Method method = TestReflect.class.getMethod("setS", int.class);
    Assert.assertEquals(method, getPropertySetterMethod(TestReflect.class, "s", int.class));
    method = TestReflect.class.getMethod("setB", boolean.class);
    Assert.assertEquals(method, getPropertySetterMethod(TestReflect.class, "b", boolean.class));
    boolean error = false;
    try {
        getPropertySetterMethod(TestReflect.class, "xxx", String.class);
    } catch (Exception e) {
        error = true;
    }
    Assert.assertTrue(error);
}