                         XCTAssertTrue(success, "GetEndpointAttributes failed.")
                         XCTAssertNil(error, "GetEndpointAttributes returned error.")
                         XCTAssertEqual(responseAttributes!.attributes["Enabled"], attributes["Enabled"], "Attributes not set properly.")
-                        XCTAssertEqual(responseAttributes!.attributes["Token"], attributes["Token"], "Attributes not set properly.")
-                        setAttributesExpectation.fulfill()
+                        XCTAssertEqual(responseAttributes!.attributes["Token"], attributes["Token"]?.lowercased(), "Attributes not set properly.")
+                        self.snsClient?.deleteEndpoint(endpointArn: endpointArn!) { _, _ in
+                            setAttributesExpectation.fulfill()
+                        }
                     })
                 }
             }

    func testDeletePlatformEndpoint() {
        let deleteExpectation = expectation(description: "CreateExpectation")
        
        let token = "6110cff81aea420ef5017029ef82dd5b44a018fae1c9a83a6ca8be5b4109bceb"
        
        snsClient?.createPlatformEndpoint(token: token, platformApplicationArn: "arn:aws:sns:us-west-2:487164526243:app/APNS_SANDBOX/Test") { success, endpointArn, error in
            self.snsClient?.deleteEndpoint(endpointArn: endpointArn!) { success, error in

    func testSetEndpointAttributes() {
        let setAttributesExpectation = expectation(description: "SetAttributesExpectation")
        
        let token = "4D54202891C45CC4D66EE1010C6A45C2E725433F6D4E5D173A4593E872C6E242"
        
        var attributes = ["Enabled" : "false", "Token" : token]
        
