     testFetchDataFailure = (method, done) ->
       withConvertedUserAndCredential ({ client, credential }) ->
 
+        # adding client to args array, if method is for remote api
+        # a client argument will be passed before callback
+        args  = [client]  if method.slice(-1) is '$'
+        args ?= []
+
         queue = [
 
           ->
-            credential[method] (err, credData) ->
+            credential[method] args..., (err, credData) ->
               credData.remove (err) ->
                 expect(err).to.not.exist
                 queue.next()
 
           ->
-            credential[method] (err, data) ->
+            credential[method] args..., (err, data) ->
               expect(err?.message).to.be.equal 'No data found'
               queue.next()
 


    testFetchDataSuccess = (method, done) ->
      withConvertedUserAndCredential ({ client, credential }) ->
        credential[method] (err, credData) ->
          expect(err).to.not.exist
          expect(credData).to.be.an 'object'
          expect(credData.identifier).to.be.equal credential.identifier
          done()


    describe 'fetchData()', ->



      it 'should fail if there is no data', (done) ->

        testFetchDataFailure 'fetchData$', done


      it 'should be able to fetch credential data', (done) ->

        testFetchDataSuccess 'fetchData$', done


  describe 'update$', ->
