'Several common assertions on Album, Track and call counts.'

def assertCounts(self, mock_write, album_count=ALBUM_COUNT, track_count=TRACK_COUNT, write_call_count=TRACK_COUNT, title_starts_with=''):

    self.assertEqual(len(self.lib.albums()), album_count)
    self.assertEqual(len(self.lib.items()), track_count)
    self.assertEqual(mock_write.call_count, write_call_count)
    self.assertTrue(all((i.title.startswith(title_starts_with) for i in self.lib.items())))
