/**
  * @param $trackId
  *
  * @return Response
  */
 public function trackAction($trackId)
 {
     /** @var TrackResource $trackResource */
     $trackResource = $this->get('atrapalo.application.model.track.get_track.get_track_command_handler')->handle(GetTrackCommand::instance($trackId));
     $albumTracks = $this->get('atrapalo.application.model.track.search_tracks.search_tracks_command_handler')->handle(SearchTracksCommand::instance(null, null, null, 1, $trackResource->album()->id()));
     return $this->render('PlayWithElasticSearchBundle:Playlists:track.html.twig', ['track' => $trackResource, 'albumTracks' => $albumTracks]);
 }
 /**
  * @test
  */
 public function itShouldReturnATrackWhenTrackIdExists()
 {
     $commandHandler = $this->buildGetTrackCommandHandler();
     /** @var GetTrackCommandResult $result */
     $result = $commandHandler->handle(GetTrackCommand::instance(self::EXISTING_TRACK_ID));
     $this->assertInstanceOf(Track::class, $result->track());
 }