def test_service_call_to_child(self):
        config = self.config_children_only
        universal.validate_config(config)

        ump = universal.UniversalMediaPlayer(self.hass, **config)
        ump.entity_id = media_player.ENTITY_ID_FORMAT.format(config['name'])
        ump.update()

        self.mock_mp_2._state = STATE_PLAYING
        self.mock_mp_2.update_ha_state()
        ump.update()

        ump.turn_off()
        self.assertEqual(1, len(self.mock_mp_2.service_calls['turn_off']))

        ump.turn_on()
        self.assertEqual(1, len(self.mock_mp_2.service_calls['turn_on']))

        ump.mute_volume(True)
        self.assertEqual(1, len(self.mock_mp_2.service_calls['mute_volume']))

        ump.set_volume_level(0.5)
        self.assertEqual(
            1, len(self.mock_mp_2.service_calls['set_volume_level']))

        ump.media_play()
        self.assertEqual(1, len(self.mock_mp_2.service_calls['media_play']))

        ump.media_pause()
        self.assertEqual(1, len(self.mock_mp_2.service_calls['media_pause']))

        ump.media_previous_track()
        self.assertEqual(
            1, len(self.mock_mp_2.service_calls['media_previous_track']))

        ump.media_next_track()
        self.assertEqual(
            1, len(self.mock_mp_2.service_calls['media_next_track']))

        ump.media_seek(100)
        self.assertEqual(1, len(self.mock_mp_2.service_calls['media_seek']))

        ump.play_media('movie', 'batman')
        self.assertEqual(1, len(self.mock_mp_2.service_calls['play_media']))

        ump.volume_up()
        self.assertEqual(1, len(self.mock_mp_2.service_calls['volume_up']))

        ump.volume_down()
        self.assertEqual(1, len(self.mock_mp_2.service_calls['volume_down']))

        ump.media_play_pause()
        self.assertEqual(
            1, len(self.mock_mp_2.service_calls['media_play_pause']))

        ump.select_source('dvd')
        self.assertEqual(
            1, len(self.mock_mp_2.service_calls['select_source']))
Test service calls that should be routed to a child.
dataset/ETHPy150Open home-assistant/home-assistant/tests/components/media_player/test_universal.py/TestMediaPlayer.test_service_call_to_child