TableSchema { public boolean hasUniqueIndices() { return uniqueIndexCount > 0; } TableSchema(Collection<ColumnSchema> columns, Collection<IndexSchema> indices); private  TableSchema(AvroTableSchema avroTableSchema); static TableSchema deserialize(byte[] serializedTableSchema); TableSchema schemaCopy(); byte[] serialize(); Collection<ColumnSchema> getColumns(); Collection<IndexSchema> getIndices(); void addIndices(Collection<IndexSchema> indices); void removeIndex(String indexName); boolean hasIndices(); boolean hasUniqueIndices(); ColumnSchema getColumnSchema(String columnName); IndexSchema getIndexSchema(String indexName); String getAutoIncrementColumn(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testHasNoUniqueIndices() { final TableSchema schema = new TableSchema(COLUMNS, ImmutableList.<IndexSchema>of()); assertFalse(schema.hasUniqueIndices()); }
@Test public void testHasUniqueIndices() { assertTrue(tableSchema.hasUniqueIndices()); }