public static List<MusicProtocol.MusicArtist> convertMusicGroupsToMusicArtists(Collection<MusicGroup> musicGroups) {

        if (musicGroups == null || musicGroups.isEmpty()) {
            return Collections.emptyList();
        }

        List<MusicProtocol.MusicArtist> musicArtists = new ArrayList<>();
        for (MusicGroup musicGroup : musicGroups) {
            if (!StringUtils.isBlank(musicGroup.getName())) {
                MusicProtocol.MusicArtist artist = MusicProtocol.MusicArtist.newBuilder()
                        .setName(musicGroup.getName())
                        .build();
                musicArtists.add(artist);
            }
        }
        return musicArtists;
    }
@Test
    public void testConvertMusicGroupsToMusicArtists() {
        String expectedName = "Expected Artist Name";
        String expectedName2 = "Expected Second Artist Name";
        MusicGroup musicGroup = new MusicGroup(expectedName);
        MusicGroup secondMusicGroup = new MusicGroup(expectedName2);

        // Null Collection
        List<MusicProtocol.MusicArtist> nullResult = AppleMusicPlaylistConverter.convertMusicGroupsToMusicArtists(null);
        Assertions.assertTrue(nullResult.isEmpty());

        // Empty Collection
        List<MusicProtocol.MusicArtist> emptyResult = AppleMusicPlaylistConverter.convertMusicGroupsToMusicArtists(List.of());
        Assertions.assertTrue(emptyResult.isEmpty());

        // Single Group
        List<MusicProtocol.MusicArtist> result1 = AppleMusicPlaylistConverter.convertMusicGroupsToMusicArtists(List.of(musicGroup));
        Assertions.assertFalse(result1.isEmpty());
        Assertions.assertEquals(result1.size(), 1);
        Assertions.assertNotNull(result1.get(0));
        Assertions.assertTrue(result1.get(0).hasName());
        Assertions.assertEquals(result1.get(0).getName(), expectedName);

        // Multiple Groups
        List<MusicProtocol.MusicArtist> result2 = AppleMusicPlaylistConverter.convertMusicGroupsToMusicArtists(List.of(musicGroup, secondMusicGroup));
        Assertions.assertFalse(result2.isEmpty());
        Assertions.assertEquals(result2.size(), 2);
        Assertions.assertNotNull(result2.get(0));
        Assertions.assertTrue(result2.get(0).hasName());
        Assertions.assertEquals(result2.get(0).getName(), expectedName);
        Assertions.assertNotNull(result2.get(1));
        Assertions.assertTrue(result2.get(1).hasName());
        Assertions.assertEquals(result2.get(1).getName(), expectedName2);
    }