'Test setup with all data.'

@mock.patch('statsd.StatsClient')
def test_statsd_setup_full(self, mock_connection):

    config = {'statsd': {'host': 'host', 'port': 123, 'rate': 1, 'prefix': 'foo'}}
    self.hass.bus.listen = mock.MagicMock()
    self.assertTrue(setup_component(self.hass, statsd.DOMAIN, config))
    self.assertEqual(mock_connection.call_count, 1)
    self.assertEqual(mock_connection.call_args, mock.call(host='host', port=123, prefix='foo'))
    self.assertTrue(self.hass.bus.listen.called)
    self.assertEqual(EVENT_STATE_CHANGED, self.hass.bus.listen.call_args_list[0][0][0])
