* @see net.sf.hajdbc.dialect.StandardDialectTest#getSequences()
*/
@Override
public void getSequences() throws SQLException
{
SequencePropertiesFactory factory = mock(SequencePropertiesFactory.class);
SequenceProperties sequence1 = mock(SequenceProperties.class);
SequenceProperties sequence2 = mock(SequenceProperties.class);
DatabaseMetaData metaData = mock(DatabaseMetaData.class);
Connection connection = mock(Connection.class);
Statement statement = mock(Statement.class);
ResultSet resultSet = mock(ResultSet.class);
when(metaData.getConnection()).thenReturn(connection);
when(connection.createStatement()).thenReturn(statement);
when(statement.executeQuery("SELECT SEQUENCE_SCHEMA, SEQUENCE_NAME, INCREMENT FROM INFORMATION_SCHEMA.SYSTEM_SEQUENCES")).thenReturn(resultSet);
when(resultSet.next()).thenReturn(true).thenReturn(true).thenReturn(false);
when(resultSet.getString(1)).thenReturn("schema1").thenReturn("schema2");
when(resultSet.getString(2)).thenReturn("sequence1").thenReturn("sequence2");
when(resultSet.getInt(3)).thenReturn(1).thenReturn(2);
when(factory.createSequenceProperties("schema1", "sequence1", 1)).thenReturn(sequence1);
when(factory.createSequenceProperties("schema2", "sequence2", 2)).thenReturn(sequence2);
Collection<SequenceProperties> results = this.dialect.getSequenceSupport().getSequences(metaData, factory);
verify(statement).close();