### Question:
Table implements Serializable { public void removeColumn(TableColumn c) { if (subjectColumnIndex != -1 && c.getColumnIndex() <= subjectColumnIndex) { subjectColumnIndex--; } else if (c.getColumnIndex() == subjectColumnIndex) { subjectColumnIndex = -1; } getSchema().removeColumn(c); for (TableRow r : getRows()) { Object[] oldValues = r.getValueArray(); Object[] newValues = new Object[oldValues.length - 1]; for (int i = 0; i < newValues.length; i++) { if (i < c.getColumnIndex()) { newValues[i] = oldValues[i]; } else if (i >= c.getColumnIndex()) { newValues[i] = oldValues[i + 1]; } } r.set(newValues); } } Table(); TableSchema getSchema(); int getSubjectColumnIndex(); void setSubjectColumnIndex(int keyIndex); boolean hasSubjectColumn(); TableColumn getSubjectColumn(); String getPath(); void setPath(String path); Collection<TableColumn> getColumns(); int getSize(); void addColumn(TableColumn c); void addRow(TableRow r); void clear(); void endLoad(); List<TableRow> getRows(); void setRows(ArrayList<TableRow> rows); TableRow get(int rowIndex); int getTableId(); void setTableId(int tableId); TableMapping getMapping(); void setMapping(TableMapping mapping); TableContext getContext(); void setContext(TableContext context); @Override String toString(); void insertColumn(int index, TableColumn c); void removeColumn(TableColumn c); TableRow removeRow(int rowNumber); void inferSchemaAndConvertValues(); void inferSchemaAndConvertValues(TypeDetector td); void inferSchema(); void inferSchema(final TypeDetector td); void convertValues(); void addDataTypesToMapping(); void identifySubjectColumn(); void identifySubjectColumn(double uniquenessThreshold); void identifySubjectColumn(double uniquenessThreshold, boolean verbose); void append(Table t); void clearProvenance(); void reorganiseRowNumbers(); Map<Integer, Integer> projectColumnIndices(Collection<TableColumn> projectedColumns); Map<Set<TableColumn>,Set<TableColumn>> projectFunctionalDependencies(Collection<TableColumn> projectedColumns); Table project(Collection<TableColumn> projectedColumns); Table project(Collection<TableColumn> projectedColumns, boolean addProvenance); Table join(Table otherTable, Collection<Pair<TableColumn,TableColumn>> joinOn, Collection<TableColumn> projection); Table join(Table otherTable, Collection<Pair<TableColumn,TableColumn>> joinOn, Collection<TableColumn> projection, Map<TableColumn, TableColumn> inputColumnToOutputColumn); Table copySchema(); Collection<Pair<TableRow, TableRow>> deduplicate(Collection<TableColumn> key); Collection<Pair<TableRow, TableRow>> deduplicate(Collection<TableColumn> key, ConflictHandling conflictHandling); Collection<Pair<TableRow, TableRow>> deduplicate(Collection<TableColumn> key, ConflictHandling conflictHandling, boolean reorganiseRowNumbers); Set<TableRow> findUniquenessViolations(Collection<TableColumn> uniqueColumnCombination); Map<TableColumn, Double> getColumnDensities(); Map<TableColumn, Integer> getNumberOfValuesPerColumn(); Map<TableColumn, Double> getColumnUniqueness(); Map<TableColumn, Set<Object>> getColumnDomains(); Set<String> getProvenance(); String formatFunctionalDependencies();  }### Answer:
@Test public void testRemoveColumn() { Table table = getTestTable(); TableColumn col = table.getSchema().get(1); table.removeColumn(col); assertEquals(2, table.getColumns().size()); assertEquals("Column 1", table.getSchema().get(0).getHeader()); assertEquals("Column 3", table.getSchema().get(1).getHeader()); assertEquals("row 1 col 1", table.get(0).get(0)); assertEquals("row 1 col 3", table.get(0).get(1)); assertEquals("row 2 col 1", table.get(1).get(0)); assertEquals("row 2 col 3", table.get(1).get(1)); assertEquals("row 3 col 1", table.get(2).get(0)); assertEquals("row 3 col 3", table.get(2).get(1)); }