public void testProxyField() throws Throwable {
Foo foo = new Foo();
Field num2 = Foo.class.getField("num2");
Field info = Foo.class.getField("info");
FieldProxy proxyNum2 = ReflectUtils.getFieldProxy(num2);
proxyNum2.set(foo, 30);
Assert.assertThat((Integer)proxyNum2.get(foo), is(30));
FieldProxy proxyInfo = ReflectUtils.getFieldProxy(info);
proxyInfo.set(foo, "test info 0");
Assert.assertThat((String)proxyInfo.get(foo), is("test info 0"));
ReflectUtils.setProperty(foo, "name", "hello");
Assert.assertThat((String)ReflectUtils.getProperty(foo, "name"), is("hello"));
Foo foo2 = new Foo();
proxyNum2 = FieldProxyFactoryUsingJavaCompiler.INSTANCE.getFieldProxy(num2);
proxyNum2.set(foo2, 303);
Assert.assertThat((Integer)proxyNum2.get(foo2), is(303));
proxyInfo = FieldProxyFactoryUsingJavaCompiler.INSTANCE.getFieldProxy(info);
proxyInfo.set(foo2, "test info 03");
Assert.assertThat((String)proxyInfo.get(foo2), is("test info 03"));
}