### Question:
FunctionDesc implements ProtoObject<FunctionDescProto>, Cloneable, GsonObject { @Override public FunctionDescProto getProto() { if (builder == null) { builder = FunctionDescProto.newBuilder(); } else { builder.clear(); } builder.setSignature(this.signature); builder.setClassName(this.funcClass.getName()); builder.setType(this.funcType); builder.setReturnType(this.returnType); if(this.description != null) { builder.setDescription(this.description); } if (this.detail != null) { builder.setDetail(this.detail); } if (this.example != null) { builder.setExample(this.example); } if (this.params != null) { builder.addAllParameterTypes(Arrays.asList(params)); } return builder.build(); } 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 testGetProto() throws InternalException, ClassNotFoundException { FunctionDesc desc = new FunctionDesc("sum", TestSum.class, FunctionType.GENERAL, CatalogUtil.newSimpleDataType(Type.INT4), CatalogUtil.newSimpleDataTypeArray(Type.INT4, Type.INT8)); FunctionDescProto proto = desc.getProto(); FunctionDesc fromProto = new FunctionDesc(proto); assertEquals(desc, fromProto); assertEquals(desc.toJson(), fromProto.toJson()); }