     }
 
     //MARK: TESTS
-    
+
     func testCreateDeleteUser() {
         attempt {
             let testData = try TestData(#function, client: client)

        accessKeyId: "key",
        secretAccessKey: "secret",
        region: .useast1,
        endpoint: ProcessInfo.processInfo.environment["IAM_ENDPOINT"] ?? "http://localhost:4593"
    )

    class TestData {
        let userName: String
        let client: IAM
        
        init(_ testName: String, client: IAM) throws {
            let testName = testName.lowercased().filter { return $0.isLetter }
            self.client = client

            policyDocument = policyDocument.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
            let getUserRequest = IAM.GetUserRequest(userName: testData.userName)
            let getUserResponse = try client.getUser(getUserRequest).wait()

            let putRequest = IAM.PutUserPolicyRequest(policyDocument: policyDocument, policyName: "testSetGetPolicy", userName: getUserResponse.user.userName)
            _ = try client.putUserPolicy(putRequest).wait()

            let getRequest = IAM.GetUserPolicyRequest(policyName: "testSetGetPolicy", userName: getUserResponse.user.userName)
            let getResponse = try client.getUserPolicy(getRequest).wait()

            XCTAssertEqual(getResponse.policyDocument.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines), policyDocument.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines))

            let deletePolicy = IAM.DeleteUserPolicyRequest(policyName: "testSetGetPolicy", userName: getUserResponse.user.userName)
            try client.deleteUserPolicy(deletePolicy).wait()
        }

    }

    static var allTests : [(String, (IAMTests) -> () throws -> Void)] {
        return [
            ("testCreateDeleteUser", testCreateDeleteUser),
            ("testSetGetPolicy", testSetGetPolicy),
        ]
    }
}
