SequenceProperties sequence2 = mock(SequenceProperties.class);
DatabaseMetaData metaData = mock(DatabaseMetaData.class);
ResultSet resultSet = mock(ResultSet.class);
when(metaData.supportsSchemasInTableDefinitions()).thenReturn(true);
when(metaData.supportsSchemasInDataManipulation()).thenReturn(true);
when(metaData.getTables(eq(""), eq((String) null), eq("%"), aryEq(new String[] { "SEQUENCE" }))).thenReturn(resultSet);
when(resultSet.next()).thenReturn(true).thenReturn(true).thenReturn(false);
when(resultSet.getString("TABLE_SCHEM")).thenReturn("schema1").thenReturn("schema2");
when(resultSet.getString("TABLE_NAME")).thenReturn("sequence1").thenReturn("sequence2");
when(factory.createSequenceProperties("schema1", "sequence1", 1)).thenReturn(sequence1);