### Question:
FunctionDesc implements ProtoObject<FunctionDescProto>, Cloneable, GsonObject { public String toJson() { return CatalogGsonHelper.toJson(this, FunctionDesc.class); } FunctionDesc();  FunctionDesc(String signature, Class<? extends Function> clazz,
      FunctionType funcType, DataType retType,
      DataType [] params);  FunctionDesc(FunctionDescProto proto);  FunctionDesc(String signature, String className, FunctionType type,
                      DataType retType,
                      DataType... argTypes); Function newInstance(); String getSignature(); @SuppressWarnings("unchecked") Class<? extends Function> getFuncClass(); FunctionType getFuncType(); DataType [] getParamTypes(); DataType getReturnType(); String getDescription(); String getDetail(); String getExample(); void setDescription(String description); void setDetail(String detail); void setExample(String example); @Override int hashCode(); @Override boolean equals(Object obj); @Override Object clone(); @Override FunctionDescProto getProto(); @Override String toString(); String toJson(); String getHelpSignature(); static String dataTypesToStr(List<DataType> parameterTypesList);  }### Answer:
@Test public void testToJson() throws InternalException { FunctionDesc desc = new FunctionDesc("sum", TestSum.class, FunctionType.GENERAL, CatalogUtil.newSimpleDataType(Type.INT4), CatalogUtil.newSimpleDataTypeArray(Type.INT4, Type.INT8)); String json = desc.toJson(); FunctionDesc fromJson = CatalogGsonHelper.fromJson(json, FunctionDesc.class); assertEquals(desc, fromJson); assertEquals(desc.getProto(), fromJson.getProto()); }