TableDesc implements ProtoObject<TableDescProto>, GsonObject, Cloneable { public String toJson() { return CatalogGsonHelper.toJson(this, TableDesc.class); } TableDesc();  TableDesc(String tableName, Schema schema, TableMeta meta,
                   URI uri, boolean external);  TableDesc(String tableName, Schema schema, TableMeta meta, URI path);  TableDesc(String tableName, Schema schema, String storeType, KeyValueSet options, URI path);  TableDesc(TableDescProto proto); void setName(String tableId); String getName(); void setPath(URI uri); URI getPath(); void setMeta(TableMeta info); TableMeta getMeta(); void setSchema(Schema schem); Schema getSchema(); Schema getLogicalSchema(); void setStats(TableStats stats); boolean hasStats(); TableStats getStats(); boolean hasPartition(); PartitionMethodDesc getPartitionMethod(); void setPartitionMethod(PartitionMethodDesc partitionMethodDesc); void setExternal(boolean external); boolean isExternal(); int hashCode(); boolean equals(Object object); Object clone(); String toString(); String toJson(); TableDescProto getProto();  }
@Test public void testToJson() throws CloneNotSupportedException, IOException { Path path = new Path(CommonTestingUtil.getTestDir(), "tajo"); TableDesc desc = new TableDesc("table1", schema, info, path.toUri()); desc.setStats(stats); String json = desc.toJson(); TableDesc fromJson = CatalogGsonHelper.fromJson(json, TableDesc.class); assertEquals("equality check the object deserialized from json", desc, fromJson); assertEquals("equality between protos", desc.getProto(), fromJson.getProto()); }