'Test if services call the entity methods as expected.'

def test_methods(self):

    remote.turn_on(self.hass, entity_id=ENTITY_ID)
    self.hass.block_till_done()
    state = self.hass.states.get(ENTITY_ID)
    self.assertEqual(state.state, STATE_ON)
    remote.turn_off(self.hass, entity_id=ENTITY_ID)
    self.hass.block_till_done()
    state = self.hass.states.get(ENTITY_ID)
    self.assertEqual(state.state, STATE_OFF)
    remote.turn_on(self.hass, entity_id=ENTITY_ID)
    self.hass.block_till_done()
    state = self.hass.states.get(ENTITY_ID)
    self.assertEqual(state.state, STATE_ON)
    remote.send_command(self.hass, 'test', entity_id=ENTITY_ID)
    self.hass.block_till_done()
    state = self.hass.states.get(ENTITY_ID)
    self.assertEqual(state.attributes, {'friendly_name': 'Remote    One', 'last_command_sent': 'test'})
