private void validate(String tableName,String columnName,Map<ColumnMetaData,Object> validationRules) throws Exception {
  validationRules.put(ColumnMetaData.TABLE_NAME,tableName);
  validationRules.put(ColumnMetaData.COLUMN_NAME,columnName);
  checkValidationRulesComplete(validationRules);
  try (ResultSet columns=dbmd.getColumns(null,null,tableName,columnName)){
    assertTrue("Expected row in column metadata",columns.next());
    validateRowValues(columns,validationRules);
    assertFalse("Expected only one row in resultset",columns.next());
  }
 }

private void validate ( String tableName , String columnName , Map < ColumnMetaData , Object > validationRules ) throws Exception { validationRules . put ( ColumnMetaData . TABLE_NAME , tableName ) ; validationRules . put ( ColumnMetaData . COLUMN_NAME , columnName ) ; checkValidationRulesComplete ( validationRules ) ; try ( ResultSet columns = dbmd . getColumns ( null , null , tableName , columnName ) ) { assertTrue ( "Expected row in column metadata" , columns . next ( ) ) ; validateRowValues ( columns , validationRules ) ; assertFalse ( "Expected only one row in resultset" , columns . next ( ) ) ; } }
method to validate the column metadata for a single column of a table ( does not support quoted identifiers ) .
