SimplePropertyPreFilter filter = new SimplePropertyPreFilter("name");
Assert.assertEquals("{\"name\":\"sandzhangtoo\"}", JSON.toJSONString(vo, filter));
}
public void test_name_a() throws Exception {
SimplePropertyPreFilter filter = new SimplePropertyPreFilter(VO.class, "name");
Assert.assertEquals(VO.class, filter.getClazz());
Assert.assertEquals(1, filter.getIncludes().size());
Assert.assertTrue(filter.apply(null, null, null));
String text = JSON.toJSONString(a, filter);
Assert.assertTrue("{\"id\":123,\"name\":\"sandzhangtoo\"}".equals(text) || "{\"name\":\"sandzhangtoo\",\"id\":123}".equals(text));
}