store = NewStore(conf, storeAdapter, fakelogger.NewFakeLogger())
	})

	AfterEach(func() {
		storeAdapter.Disconnect()
	})

	Describe("Saving crash state", func() {
		BeforeEach(func() {
			err := store.SaveCrashCounts(crashCount1, crashCount2)
			Ω(err).ShouldNot(HaveOccurred())
		})

		It("stores the passed in crash state", func() {
			expectedTTL := uint64(conf.MaximumBackoffDelay().Seconds()) * 2

			node, err := storeAdapter.Get("/hm/v1/apps/crashes/" + crashCount1.AppGuid + "," + crashCount1.AppVersion + "/1")
			Ω(err).ShouldNot(HaveOccurred())
			Ω(node).Should(Equal(storeadapter.StoreNode{
				Key:   "/hm/v1/apps/crashes/" + crashCount1.AppGuid + "," + crashCount1.AppVersion + "/1",
				Value: crashCount1.ToJSON(),
				TTL:   expectedTTL,
			}))

			node, err = storeAdapter.Get("/hm/v1/apps/crashes/" + crashCount2.AppGuid + "," + crashCount2.AppVersion + "/4")
			Ω(err).ShouldNot(HaveOccurred())
			Ω(node).Should(Equal(storeadapter.StoreNode{
				Key:   "/hm/v1/apps/crashes/" + crashCount2.AppGuid + "," + crashCount2.AppVersion + "/4",
				Value: crashCount2.ToJSON(),
				TTL:   expectedTTL,