IndexDesc implements ProtoObject<IndexDescProto>, Cloneable { @Override public IndexDescProto getProto() { IndexDescProto.Builder builder = IndexDescProto.newBuilder(); CatalogProtos.TableIdentifierProto.Builder tableIdentifierBuilder = CatalogProtos.TableIdentifierProto.newBuilder(); if (databaseName != null) { tableIdentifierBuilder.setDatabaseName(databaseName); } if (tableName != null) { tableIdentifierBuilder.setTableName(tableName); } builder.setTableIdentifier(tableIdentifierBuilder.build()); builder.setIndexName(this.indexName); builder.setColumn(this.column.getProto()); builder.setIndexMethod(indexMethod); builder.setIsUnique(this.isUnique); builder.setIsClustered(this.isClustered); builder.setIsAscending(this.isAscending); return builder.build(); } IndexDesc();  IndexDesc(String idxName, String databaseName, String tableName, Column column,
                   IndexMethod type,  boolean isUnique, boolean isClustered, boolean isAscending);  IndexDesc(IndexDescProto proto); String getIndexName(); String getTableName(); Column getColumn(); IndexMethod getIndexMethod(); boolean isClustered(); boolean isUnique(); boolean isAscending(); @Override IndexDescProto getProto(); boolean equals(Object obj); int hashCode(); Object clone(); String toString();  }
@Test public void testIndexDescProto() { IndexDescProto proto = desc1.getProto(); assertEquals(desc1.getProto(), proto); assertEquals(desc1, new IndexDesc(proto)); }