function createRtdbStub(refExtension) {
  let refReturn = {
    push: sinon.stub().returns({ set: createSuccessStub() }),
    ...createRtdbProfileRefStub()
  }
  if (refExtension) {
    refReturn = { ...refReturn, ...refExtension }
  }
  const stubbedRtdb = sinon.stub().returns({
    ref: sinon.stub().returns(refReturn)
  })
  stubbedRtdb.ServerValue = { TIMESTAMP: 'test' }
  return stubbedRtdb
}
Create a Sinon stub for Firebase Real Time Database (RTDB)

@returns {Sinon.stub}
@param refExtension