test_class.declarator: gameMenuController
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private GameMenuController gameMenuController;
test_class.type: GameMenuController
test_class.var_name: gameMenuController
test_class.declarator: mockGameContext
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GameContext mockGameContext;
test_class.type: GameContext
test_class.var_name: mockGameContext
test_class.declarator: mockGameSpec
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GameSpec mockGameSpec;
test_class.type: GameSpec
test_class.var_name: mockGameSpec
test_class.declarator: mockGameSummary
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GameSummary mockGameSummary;
test_class.type: GameSummary
test_class.var_name: mockGameSummary
test_class.declarator: mockMusicControl
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private MusicControl mockMusicControl;
test_class.type: MusicControl
test_class.var_name: mockMusicControl
test_class.declarator: mockMusicManager
test_class.modifier: @Mock(answer = Answers.RETURNS_DEEP_STUBS)
      private
test_class.original_string: @Mock(answer = Answers.RETURNS_DEEP_STUBS)
      private BackgroundMusicManager mockMusicManager;
test_class.type: BackgroundMusicManager
test_class.var_name: mockMusicManager
test_class.file: gazeplay-core/src/test/java/net/gazeplay/ui/scenes/gamemenu/GameMenuControllerTest.java
test_class.identifier: GameMenuControllerTest
test_case.body: @Test
      void shouldNotSetBackgroundMusic() {
          when(mockMusicManager.getCurrentMusic().getMedia().getSource()).thenReturn("another-song.mp3");
          when(mockMusicManager.getPlaylist().isEmpty()).thenReturn(false);
  
          gameMenuController.playBackgroundMusic(mockGameContext, mockGameSpec, mockMusicManager);
  
          assertTrue(BackgroundMusicManager.getInstance().getBackupPlaylist().isEmpty());
      }
test_case.class_method_signature: GameMenuControllerTest.shouldNotSetBackgroundMusic()
test_case.full_signature: @Test void shouldNotSetBackgroundMusic()
test_case.identifier: shouldNotSetBackgroundMusic
test_case.invocations: thenReturn when getSource getMedia getCurrentMusic thenReturn when isEmpty getPlaylist playBackgroundMusic assertTrue isEmpty getBackupPlaylist getInstance
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNotSetBackgroundMusic()
focal_class.declarator: applicationContext
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ApplicationContext applicationContext;
focal_class.type: ApplicationContext
focal_class.var_name: applicationContext
focal_class.file: gazeplay-core/src/main/java/net/gazeplay/ui/scenes/gamemenu/GameMenuController.java
focal_class.identifier: GameMenuController
focal_class.class_method_signature: GameMenuController.onGameSelection(
          @NonNull GazePlay gazePlay,
          @NonNull Parent root,
          @NonNull GameSpec gameSpec,
          String gameName
      )
focal_class.full_signature: public void onGameSelection(
          @NonNull GazePlay gazePlay,
          @NonNull Parent root,
          @NonNull GameSpec gameSpec,
          String gameName
      )
focal_class.identifier: onGameSelection
focal_class.modifiers: public
focal_class.parameters: (
          @NonNull GazePlay gazePlay,
          @NonNull Parent root,
          @NonNull GameSpec gameSpec,
          String gameName
      )
focal_class.return: void
focal_class.signature: void onGameSelection(
          @NonNull GazePlay gazePlay,
          @NonNull Parent root,
          @NonNull GameSpec gameSpec,
          String gameName
      )
focal_class.class_method_signature: GameMenuController.chooseGame(
          GazePlay gazePlay,
          GameSpec selectedGameSpec,
          IGameVariant gameVariant
      )
focal_class.full_signature: public void chooseGame(
          GazePlay gazePlay,
          GameSpec selectedGameSpec,
          IGameVariant gameVariant
      )
focal_class.identifier: chooseGame
focal_class.modifiers: public
focal_class.parameters: (
          GazePlay gazePlay,
          GameSpec selectedGameSpec,
          IGameVariant gameVariant
      )
focal_class.return: void
focal_class.signature: void chooseGame(
          GazePlay gazePlay,
          GameSpec selectedGameSpec,
          IGameVariant gameVariant
      )
focal_class.class_method_signature: GameMenuController.playBackgroundMusic(GameContext gameContext, GameSpec selectedGameSpec, BackgroundMusicManager musicManager)
focal_class.full_signature:  void playBackgroundMusic(GameContext gameContext, GameSpec selectedGameSpec, BackgroundMusicManager musicManager)
focal_class.identifier: playBackgroundMusic
focal_class.parameters: (GameContext gameContext, GameSpec selectedGameSpec, BackgroundMusicManager musicManager)
focal_class.return: void
focal_class.signature: void playBackgroundMusic(GameContext gameContext, GameSpec selectedGameSpec, BackgroundMusicManager musicManager)
focal_method.body: void playBackgroundMusic(GameContext gameContext, GameSpec selectedGameSpec, BackgroundMusicManager musicManager) {
          MediaPlayer currentMusic = musicManager.getCurrentMusic();
          boolean defaultMusicPlaying = true;
          if (currentMusic != null) {
              Media currentMedia = currentMusic.getMedia();
              if (currentMedia != null) {
                  defaultMusicPlaying = currentMedia.getSource().contains(Configuration.DEFAULT_VALUE_BACKGROUND_MUSIC);
              }
          }
          log.info("is default music set : {}", defaultMusicPlaying);
          if (defaultMusicPlaying || musicManager.getPlaylist().isEmpty()) {
              musicManager.backupPlaylist();
              musicManager.emptyPlaylist();
              musicManager.playMusicAlone(selectedGameSpec.getGameSummary().getBackgroundMusicUrl());
              gameContext.getMusicControl().updateMusicController();
          }
      }
focal_method.class_method_signature: GameMenuController.playBackgroundMusic(GameContext gameContext, GameSpec selectedGameSpec, BackgroundMusicManager musicManager)
focal_method.full_signature:  void playBackgroundMusic(GameContext gameContext, GameSpec selectedGameSpec, BackgroundMusicManager musicManager)
focal_method.identifier: playBackgroundMusic
focal_method.invocations: getCurrentMusic getMedia contains getSource info isEmpty getPlaylist backupPlaylist emptyPlaylist playMusicAlone getBackgroundMusicUrl getGameSummary updateMusicController getMusicControl
focal_method.parameters: (GameContext gameContext, GameSpec selectedGameSpec, BackgroundMusicManager musicManager)
focal_method.return: void
focal_method.signature: void playBackgroundMusic(GameContext gameContext, GameSpec selectedGameSpec, BackgroundMusicManager musicManager)