String expectedName = expectedColumns[i].getColumnName(); String actualName = actualColumns[i].getColumnName(); if (!expectedName.equalsIgnoreCase(actualName))
if (!actualNames[i].equals(expectedNames[i]))
    public static void assertEquals(ITable expectedTable, ITable actualTable)            throws Exception    {        // Do not continue if same instance        if (expectedTable == actualTable)        {            return;        }        ITableMetaData expectedMetaData = expectedTable.getTableMetaData();        ITableMetaData actualMetaData = actualTable.getTableMetaData();        String expectedTableName = expectedMetaData.getTableName();//        // verify table name//        Assert.assertEquals("table name", expectedMetaData.getTableName(),//                actualMetaData.getTableName());        // Verify columns        Column[] expectedColumns = getSortedColumns(expectedMetaData);        Column[] actualColumns = getSortedColumns(actualMetaData);        Assert.assertEquals("column count (table=" + expectedTableName + ")",                expectedColumns.length, actualColumns.length);        for (int i = 0; i < expectedColumns.length; i++)        {            String expectedName = expectedColumns[i].getColumnName();            String actualName = actualColumns[i].getColumnName();            if (!expectedName.equalsIgnoreCase(actualName))            {                Assert.fail("expected columns " + getColumnNamesAsString(expectedColumns) +                        " but was " + getColumnNamesAsString(actualColumns) +                        " (table=" + expectedTableName + ")");            }        }        // Verify row count        Assert.assertEquals("row count (table=" + expectedTableName + ")",                expectedTable.getRowCount(), actualTable.getRowCount());        // values as strings        for (int i = 0; i < expectedTable.getRowCount(); i++)        {            for (int j = 0; j < expectedColumns.length; j++)            {                Column expectedColumn = expectedColumns[j];                Column actualColumn = actualColumns[j];                String columnName = expectedColumn.getColumnName();                Object expectedValue = expectedTable.getValue(i, columnName);                Object actualValue = actualTable.getValue(i, columnName);                DataType dataType = getComparisonDataType(                        expectedTableName, expectedColumn, actualColumn);                if (dataType.compare(expectedValue, actualValue) != 0)                {                    Assert.fail("value (table=" + expectedTableName + ", " +                            "row=" + i + ", col=" + columnName + "): expected:<" +                            expectedValue + "> but was:<" + actualValue + ">");                }            }        }    }