}
public void testCheckArtistTagInfo() throws IOException, SQLException {
final TestDatabase db = new TestDatabase();
final DBCollectionManager cm = new DBCollectionManager( db, p, indexer );
final String artistName = "My Artist";
int firstArtistId = 0, secondArtistId = 0;
db.fixture( "checkArtistTagChange" );
Tag newTag = createMock( Tag.class );
expect( newTag.getArtist() ).andReturn( artistName ).times(2);
replay( newTag );
Statement st = db.getConnection().createStatement();
ResultSet rs = st.executeQuery("select * from albums where id = 1" );
while (rs.next())
firstArtistId = rs.getInt( "artist_id" );
Utils.close( rs );
Utils.close( st );
Track track = cm.getTrack( 3 );
cm.checkArtistTagInfo( newTag, track );
track = cm.getTrack( 3 );
st = db.getConnection().createStatement();
rs = st.executeQuery("select * from albums where id = 3" );
while (rs.next())
secondArtistId = rs.getInt( "artist_id" );