return prefs;
}
public static SQLAlias getEasyMockSQLAlias(IIdentifier SqlAliasId,
IIdentifier SqlDriverId) {
SQLAlias mockSqlAlias = createMock(SQLAlias.class);
SQLDriverPropertyCollection mockSqlDriverPropCol = createMock(SQLDriverPropertyCollection.class);
expect(mockSqlAlias.getIdentifier()).andReturn(SqlAliasId).anyTimes();
expect(mockSqlAlias.getName()).andReturn("TestAliasName").anyTimes();
expect(mockSqlAlias.getDriverIdentifier()).andReturn(SqlDriverId)
.anyTimes();
expect(mockSqlAlias.getUrl()).andReturn("TestUrl").anyTimes();
expect(mockSqlAlias.getUserName()).andReturn("TestUserName").anyTimes();
expect(mockSqlAlias.getPassword()).andReturn("TestPassword").anyTimes();
expect(mockSqlAlias.isAutoLogon()).andReturn(true).anyTimes();
expect(mockSqlAlias.getUseDriverProperties()).andReturn(true).anyTimes();
expect(mockSqlAlias.getDriverPropertiesClone()).andReturn(mockSqlDriverPropCol)
.anyTimes();
SQLAliasConnectionProperties mockConnProps = createMock(SQLAliasConnectionProperties.class);
expect(mockConnProps.isEnableConnectionKeepAlive()).andStubReturn(false);
expect(mockConnProps.getKeepAliveSleepTimeSeconds()).andStubReturn(120);
expect(mockConnProps.getKeepAliveSqlStatement()).andStubReturn("");
expect(mockSqlAlias.getConnectionProperties()).andStubReturn(mockConnProps);
replay(mockSqlAlias);
replay(mockConnProps);
return mockSqlAlias;
}