JsonDefaultHandler handler = new JsonDefaultHandler();
jsonParser.parse(new ByteArrayInputStream(source.getBytes()), handler);
JsonValue jsonValue = handler.getJsonObject();
//System.out.println(jsonValue);
BeanWithSimpleEnum o = ObjectBuilder.createObject(BeanWithSimpleEnum.class, jsonValue);
assertEquals("andrew", o.getName());
assertEquals(StringEnum.TREE, o.getCount());
StringEnum[] counts = o.getCounts();
assertEquals(2, counts.length);
List<StringEnum> tmp = Arrays.asList(counts);
assertTrue(tmp.contains(StringEnum.TWO));
assertTrue(tmp.contains(StringEnum.TREE));
tmp = o.getCountList();
assertEquals(3, tmp.size());
assertTrue(tmp.contains(StringEnum.ONE));
assertTrue(tmp.contains(StringEnum.TWO));
assertTrue(tmp.contains(StringEnum.TREE));
}