))
			})
		})
	})

	Describe("Validate", func() {
		It("returns error if max tries is < 1", func() {
			err := boshblob.NewRetryableBlobstore(innerBlobstore, -1, logger).Validate()
			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring("Max tries must be > 0"))

			err = boshblob.NewRetryableBlobstore(innerBlobstore, 0, logger).Validate()
			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring("Max tries must be > 0"))
		})

		It("delegates to inner blobstore to validate", func() {
			err := retryableBlobstore.Validate()
			Expect(err).ToNot(HaveOccurred())
		})

		It("returns error if inner blobstore validation fails", func() {
			innerBlobstore.ValidateError = bosherr.Error("fake-validate-error")

			err := retryableBlobstore.Validate()
			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring("fake-validate-error"))
		})
	})
})
			Expect(innerBlobstore.CreateFileNames[0]).To(Equal("createdFile"))
		})

		It("returns an error if the inner blobstore fails to create", func() {
			innerBlobstore.CreateErr = errors.New("error creating")

			_, err := cascadingBlobstore.Create("createdFile")

			Expect(err).ToNot(BeNil())
			Expect(err.Error()).To(Equal("error creating"))
		})
	})

	Describe("Validate", func() {
		It("delegates the action to the inner blobstore", func() {
			err := cascadingBlobstore.Validate()

			Expect(err).To(BeNil())
		})

		It("returns an error if the inner blobstore fails to validate", func() {
			innerBlobstore.ValidateError = errors.New("error validating")

			err := cascadingBlobstore.Validate()

			Expect(err).ToNot(BeNil())
			Expect(err.Error()).To(Equal("error validating"))
		})
	})

	Describe("Delete", func() {
			Expect(blobID).To(Equal("fake-blob-id"))
			Expect(sha1).To(Equal(fixtureSHA1))

			Expect(innerBlobstore.CreateFileNames[0]).To(Equal(fixturePath))
		})

		It("returns error if inner blobstore blob creation fails", func() {
			innerBlobstore.CreateErr = errors.New("fake-create-error")

			_, _, err := sha1VerifiableBlobstore.Create(fixturePath)
			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring("fake-create-error"))
		})
	})

	Describe("Validate", func() {
		It("delegates to inner blobstore to validate", func() {
			err := sha1VerifiableBlobstore.Validate()
			Expect(err).ToNot(HaveOccurred())
		})

		It("returns error if inner blobstore validation fails", func() {
			innerBlobstore.ValidateError = bosherr.Error("fake-validate-error")

			err := sha1VerifiableBlobstore.Validate()
			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring("fake-validate-error"))
		})
	})
})
			Expect(err).ToNot(HaveOccurred())
			Expect(blobID).To(Equal("fake-blob-id"))

			Expect(innerBlobstore.CreateFileNames[0]).To(Equal(fixturePath))
		})

		It("returns error if inner blobstore blob creation fails", func() {
			innerBlobstore.CreateErr = errors.New("fake-create-error")

			_, err := checksumVerifiableBlobstore.Create(fixturePath)
			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring("fake-create-error"))
		})
	})

	Describe("Validate", func() {
		It("delegates to inner blobstore to validate", func() {
			err := checksumVerifiableBlobstore.Validate()
			Expect(err).ToNot(HaveOccurred())
		})

		It("returns error if inner blobstore validation fails", func() {
			innerBlobstore.ValidateError = bosherr.Error("fake-validate-error")

			err := checksumVerifiableBlobstore.Validate()
			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring("fake-validate-error"))
		})
	})
})