Added tests for AwsApiClient and AwsCollection.

The code looks ugly, but I'm not sure what a better way would look like.