bulkTokenAsJson = `{"id":3}`
					})

					It("returns a list only the length of the batch size", func() {
						Ω(response.Results).Should(BeEmpty())
						Ω(response.BulkToken.Id).Should(Equal(3))
					})

					It("increments the NumberOfCompleteFetches counter", func() {
						Ω(server.NumberOfCompleteFetches).Should(Equal(1))
					})
				})
			})
		})
	})
})

var _ = Describe("fetch credetials", func() {
	It("should respond to 'cloudcontroller.bulk.credentials.default' with a username and password", func(done Done) {
		response := make(chan string, 0)
		err := fakeMessageBus.Request("cloudcontroller.bulk.credentials.default", []byte{}, func(r []byte) {
			response <- string(r)
		})

		Ω(err).ShouldNot(HaveOccured())
		Ω(<-response).Should(Equal(`{"user":"******","password":"******"}`))

		done <- true
	}, 2)
})