TableSchema { public void removeIndex(String indexName) { Verify.isNotNullOrEmpty(indexName); IndexSchema schema = getIndexSchema(indexName); checkNotNull(schema); indices.remove(schema); avroTableSchema.getIndices().remove(indexName); if (schema.getIsUnique()) { uniqueIndexCount--; } } 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(expected = IllegalArgumentException.class) public void testRemoveIndexEmptyIndexName() { tableSchema.removeIndex(""); }
@Test(expected = NullPointerException.class) public void testRemoveIndexInvalidIndexName() { tableSchema.removeIndex(null); }
@Test(expected = NullPointerException.class) public void testRemoveIndexUnknownIndexName() { tableSchema.removeIndex(UNKNOWN_INDEX); }