'Test handling of a normal request with a response.'

def testHandleMessage(self):

    args = rdf_client.LogMessage(data='hello')
    message = rdf_flows.GrrMessage(name='MockAction', session_id=self.session_id, auth_state=rdf_flows.GrrMessage.AuthorizationState.AUTHENTICATED, payload=args, request_id=1, generate_task_id=True)
    self.context.HandleMessage(message)
    message_list = self.context.Drain().job
    self.assertEqual(message_list[0].session_id, self.session_id)
    self.assertEqual(message_list[0].response_id, 1)
    self.assertIn('hello', message_list[0].payload.data)
    self.assertEqual(message_list[1].response_id, 2)
    self.assertEqual(message_list[1].type, rdf_flows.GrrMessage.Type.STATUS)
