TableMetaData { public int findColumnIndex(final String columnName) { for (int i = 0; i < columnNames.size(); i++) { if (columnNames.get(i).equals(columnName)) { return i; } } return -1; } TableMetaData();  TableMetaData(final Collection<ColumnMetaData> columnMetaDataList, final Collection<IndexMetaData> indexMetaDataList); ColumnMetaData getColumnMetaData(final int columnIndex); int findColumnIndex(final String columnName); boolean isPrimaryKey(final int columnIndex);  }
@Test public void assertFindColumnIndex() { assertThat(tableMetaData.findColumnIndex("test"), is(0)); assertThat(tableMetaData.findColumnIndex("non_exist"), is(-1)); }