It("should bump the freshness", func() {
					fresh, _ := store.IsDesiredStateFresh()
					Expect(fresh).To(BeTrue())
				})

				It("should store any desired state that is in the STARTED appstate and STAGED package state, and delete any stale data", func() {
					desired, _ := store.GetDesiredState()
					Expect(desired).To(HaveLen(3))
					Expect(desired).To(ContainElement(EqualDesiredState(a1.DesiredState(1))))
					Expect(desired).To(ContainElement(EqualDesiredState(a2.DesiredState(1))))
					Expect(desired).To(ContainElement(EqualDesiredState(pendingStagingDesiredState)))
				})

				It("should track the time taken to sync desired state", func() {
					Expect(metricsAccountant.TrackDesiredStateSyncTimeCallCount()).NotTo(BeZero())
				})

				It("should send a succesful result down the result channel", func() {
					var result DesiredStateFetcherResult
					Eventually(resultChan).Should(Receive(&result))
					Expect(result.Success).To(BeTrue())
					Expect(result.Message).To(BeZero())
					Expect(result.Error).ToNot(HaveOccurred())
				})

				Context("and it fails to write to the store", func() {
					BeforeEach(func() {
						storeAdapter.SetErrInjector = fakestoreadapter.NewFakeStoreAdapterErrorInjector("desired", errors.New("oops!"))
					})