Add test for agent resources:

@peterbourgon  @jmyounker @stuartnelson3 
I was wondering whether I should use it. But no one from the other tests uses the client. But I changed it.