       filterIndicatorsWithDataStub.restore()
       done(err)
 
-  ).fail((err)->
+  ).catch((err)->
     filterIndicatorsWithDataStub.restore()
     done(err)
   )

      hasDataStub.restore()
      done(err)

  ).fail( (err) ->
    hasDataStub.restore()
    done(err)
  )

    Q.fcall(->)
  )

  Promise.join(
    Promise.promisify(theme.save, theme)(),
    Promise.promisify(indicator1.save, indicator1)(),
    Promise.promisify(indicator2.save, indicator2)()
  ).then(->
    stubReq = {}

