'Test volume down.'

@mock.patch('libsoundtouch.device.SoundTouchDevice.volume_down')
@mock.patch('libsoundtouch.device.SoundTouchDevice.volume')
@mock.patch('libsoundtouch.device.SoundTouchDevice.status')
@mock.patch('libsoundtouch.soundtouch_device', side_effect=_mock_soundtouch_device)
def test_volume_down(self, mocked_sountouch_device, mocked_status, mocked_volume, mocked_volume_down):

    soundtouch.setup_platform(self.hass, default_component(), mock.MagicMock())
    all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH]
    all_devices[0].volume_down()
    self.assertEqual(mocked_sountouch_device.call_count, 1)
    self.assertEqual(mocked_status.call_count, 1)
    self.assertEqual(mocked_volume.call_count, 2)
    self.assertEqual(mocked_volume_down.call_count, 1)
