expectedCacheDependencies := []*models.CachedDependency{
				&models.CachedDependency{
					From:     "http://file-server.com/v1/static/some-lifecycle.tgz",
					To:       "/tmp/lifecycle",
					CacheKey: "buildpack-some-stack-lifecycle",
				},
			}

			Expect(taskDefinition.LegacyDownloadUser).To(Equal("vcap"))
			Expect(taskDefinition.CachedDependencies).To(BeEquivalentTo(expectedCacheDependencies))
		})

		Context("when the droplet uri is missing", func() {
			BeforeEach(func() {
				newTaskReq.DropletUri = ""
			})

			It("returns an error", func() {
				Expect(err).To(Equal(recipebuilder.ErrDropletSourceMissing))
			})
		})

		Context("when the docker path is specified", func() {
			BeforeEach(func() {
				newTaskReq.DockerPath = "jim/jim"
			})

			It("returns an error", func() {
				Expect(err).To(Equal(recipebuilder.ErrMultipleAppSources))
			})
			BeforeEach(func() {
				taskRequest.DockerPath = ""
			})

			It("returns an error", func() {
				Expect(err).To(Equal(recipebuilder.ErrDockerImageMissing))
			})
		})

		Context("with an invalid docker path url", func() {
			BeforeEach(func() {
				taskRequest.DockerPath = "docker://jim/jim"
			})

			It("returns an error", func() {
				Expect(err).To(HaveOccurred())
			})
		})

		Context("when a droplet uri is specified", func() {
			BeforeEach(func() {
				taskRequest.DropletUri = "https://utako.utako.com"
			})

			It("returns an error", func() {
				Expect(err).To(Equal(recipebuilder.ErrMultipleAppSources))
			})
		})
	})
})