Add test for an agent that runs as owner.

This doesn't test that the agent switches back ownership, because
following tests use a new request.