Setting session user into functional tests

I am using restful authentication. So, some controllers requires a session with a user logged in. Now, I am trying to write functional tests for those controllers. I wanna set a session user (in ‘setup’ for example) and than test assertions supposing that a user is logged in. How can I do that?

Regards,

I am using restful authentication. So, some controllers requires a session with a user logged in. Now, I am trying to write functional tests for those controllers. I wanna set a session user (in 'setup' for example) and than test assertions supposing that a user is logged in. How can I do that?