return result;
}
public static ForeignKeyInfo[] getEasyMockForeignKeyInfos(String fkName,
String ctab, String ccol, String ptab, String pcol) {
ForeignKeyInfo result = createMock(ForeignKeyInfo.class);
expect(result.getSimpleName()).andReturn(fkName).anyTimes();
expect(result.getForeignKeyColumnName()).andReturn(ccol).anyTimes();
expect(result.getPrimaryKeyColumnName()).andReturn(pcol).anyTimes();
expect(result.getForeignKeyTableName()).andReturn(ctab).anyTimes();
expect(result.getPrimaryKeyTableName()).andReturn(ptab).anyTimes();
expect(result.getDeleteRule()).andReturn(DatabaseMetaData.importedKeyCascade)
.anyTimes();
expect(result.getUpdateRule()).andReturn(DatabaseMetaData.importedKeyCascade)
.anyTimes();
expect(result.getForeignKeySchemaName()).andStubReturn("TestSchema");
expect(result.getPrimaryKeySchemaName()).andStubReturn("TestSchema");
ForeignKeyColumnInfo mockForeignKeyColumnInfo = createMock("mockForeignKeyColumnInfo", ForeignKeyColumnInfo.class);
expect(mockForeignKeyColumnInfo.getForeignKeyColumnName()).andStubReturn(ccol);
expect(mockForeignKeyColumnInfo.getPrimaryKeyColumnName()).andStubReturn(pcol);
expect(mockForeignKeyColumnInfo.getKeySequence()).andStubReturn(0);
expect(result.getForeignKeyColumnInfo()).andStubReturn(new ForeignKeyColumnInfo[] { mockForeignKeyColumnInfo });
replay(mockForeignKeyColumnInfo);
replay(result);
return new ForeignKeyInfo[] { result };
}