  @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());
  }