 			done()
 
 	it 'Application retrieval by owner - env.data.apps.getByOwner (success case)', (done) ->
-		suffix = '-1'
+		uid = '-1'
 		env.data.apps.create {name:'myapp'}, { id: 5 }, (err, app) ->
 			expect(err).toBeNull()
 			env.data.apps.getByOwner 5, (err, apps) ->

				done()

	it 'Application retrieval by owner - env.data.apps.getByOwner (error cases)', (done) ->
		suffix = '-1'
		env.data.apps.create {name:'myapp'}, { id: 6 }, (err, app) ->
			expect(err).toBeNull()
			env.data.apps.getByOwner 6, (err, apps) ->

			logs.push(arguments)

		env.data.generateUid = () ->
			return uid

	it 'Application creation - env.data.apps.create (success case)', (done) ->
		
		expect(env.data.apps.create).toBeDefined()
		uid = '-0'
		env.data.apps.create { name: 'myapp' }, { id: 1 }, (err, app) ->
			expect(err).toBe(null)
			expect(typeof app).toBe('object')
