public void test_null() throws Exception {
FieldInfo fieldInfo = new FieldInfo("getValue", Entity.class.getMethod("getValue"), null);
Assert.assertEquals(null, fieldInfo.getAnnotation(JSONField.class));
Field field = GenericFieldEntity.class.getField("value");
Type type = new ParameterizedTypeImpl(new Type[] { ValueObject.class }, null, GenericFieldEntity.class);
FieldInfo fieldInfoOfField = new FieldInfo("value", null, field, GenericFieldEntity.class, type);
Assert.assertEquals(fieldInfoOfField.getFieldType(), ValueObject.class);
Assert.assertEquals(fieldInfoOfField.getFieldClass(), ValueObject.class);
field = GenericListFieldEntity.class.getField("value");
type = new ParameterizedTypeImpl(new Type[] { ValueObject.class }, null, GenericListFieldEntity.class);
FieldInfo fieldInfoOfListField = new FieldInfo("value", null, field, GenericListFieldEntity.class, type);
ParameterizedTypeImpl actualFieldType = (ParameterizedTypeImpl) fieldInfoOfListField.getFieldType();
Assert.assertEquals(actualFieldType.getActualTypeArguments()[0], ValueObject.class);
Assert.assertEquals(actualFieldType.getRawType(), List.class);
Assert.assertEquals(fieldInfoOfListField.getFieldClass(), List.class);
Assert.assertEquals(null, ((ParameterizedTypeImpl) type).getOwnerType());
Method method = GenericSetterEntity.class.getMethod("setValue", Object.class);
type = new ParameterizedTypeImpl(new Type[] { ValueObject.class }, null, GenericSetterEntity.class);
FieldInfo fieldInfoOfSetter = new FieldInfo("value", method, null, GenericSetterEntity.class, type);
Assert.assertEquals(fieldInfoOfSetter.getFieldType(), ValueObject.class);
Assert.assertEquals(fieldInfoOfSetter.getFieldClass(), ValueObject.class);
fieldInfoOfSetter.toString();
method = GenericListSetterEntity.class.getMethod("setValue", List.class);
type = new ParameterizedTypeImpl(new Type[] { ValueObject.class }, null, GenericListSetterEntity.class);
FieldInfo fieldInfoOfListSetter = new FieldInfo("value", method, null, GenericListSetterEntity.class, type);
Assert.assertEquals(actualFieldType.getActualTypeArguments()[0], ValueObject.class);
Assert.assertEquals(actualFieldType.getRawType(), List.class);
Assert.assertEquals(fieldInfoOfListSetter.getFieldClass(), List.class);
}