chan1 := make(chan struct{})
						chan2 := make(chan struct{})

						action := func(control chan struct{}) {
							defer GinkgoRecover()
							repo.Unbind("foo", "foo-binding")
							close(control)
						}

						repo.Lock()

						go action(chan1)

						Consistently(chan1).ShouldNot(BeClosed())

						repo.Unlock()

						Eventually(chan1).Should(BeClosed())

						go action(chan2)

						Eventually(chan2).Should(BeClosed())
					})
				})

				Context("when the statefile cannot be persisted", func() {
					BeforeEach(func() {
						os.Remove(statefilePath)
						os.Mkdir(statefilePath, 0644)
					})