         self.run(target: listener.localURLEndpoint, type: .pushAndPull, continuous: false,
                  auth: nil, expectedError: CBLErrorHTTPAuthRequired)
         
-        // Replicator - Wrong Credentials:
-        var auth = BasicAuthenticator.init(username: "daniel", password: "456")
+        // Replicator - Wrong Username:
+        var auth = BasicAuthenticator.init(username: "daneil", password: "123")
         self.run(target: listener.localURLEndpoint, type: .pushAndPull, continuous: false,
                  auth: auth, expectedError: CBLErrorHTTPAuthRequired)
+        
+        // Replicator - Wrong Password:
+        auth = BasicAuthenticator.init(username: "daniel", password: "456")
+        self.run(target: listener.localURLEndpoint, type: .pushAndPull, continuous: false,
+                 auth: auth, expectedError: CBLErrorHTTPAuthRequired)
+        
+        // Replicator - Client Cert Authenticator
+        let certAuth = ClientCertificateAuthenticator(identity: try tlsIdentity(false)!)
+        self.run(target: listener.localURLEndpoint, type: .pushAndPull, continuous: false,
+                 auth: certAuth, expectedError: CBLErrorHTTPAuthRequired)
+        try cleanupTLSIdentity(false) // cleanup client cert auth identity
         
         // Replicator - Success:
         auth = BasicAuthenticator.init(username: "daniel", password: "123")

        XCTAssertNil(listener.tlsIdentity)
        
        // User Identity:
        try TLSIdentity.deleteIdentity(withLabel: serverCertLabel);
        let attrs = [certAttrCommonName: "CBL-Server"]
        let identity = try TLSIdentity.createIdentity(forServer: true,
                                                      attributes: attrs,
                                                      expiration: nil,
                                                      label: serverCertLabel)
        config = URLEndpointListenerConfiguration.init(database: self.oDB)
        config.tlsIdentity = identity
        listener = URLEndpointListener.init(config: config)

        XCTAssertNotNil(listener.tlsIdentity)
        XCTAssertEqual(listener.tlsIdentity!.certs.count, 1)
        
        // Replicator:
        let auth = ClientCertificateAuthenticator(identity: try tlsIdentity(false)!)
        let serverCert = listener.tlsIdentity!.certs[0]
        self.run(target: listener.localURLEndpoint, type: .pushAndPull, continuous: false, auth: auth, serverCert: serverCert)
        
        // Cleanup:
        try cleanupTLSIdentity(false)
        try stopListen()
    }
    
