hbEvent := hbEnvelope.GetHeartbeat()

					if hbEvent.GetReceivedCount() == 1 {
						return true
					}
				}

				return false
			}).Should(BeTrue())
		})
	})

	Describe("Close", func() {
		var hbEmitter emitter.ByteEmitter

		BeforeEach(func() {
			hbEmitter, _ = emitter.NewHeartbeatEmitter(wrappedEmitter, origin)
		})

		It("eventually delegates to the inner heartbeat emitter", func() {
			hbEmitter.Close()
			Eventually(wrappedEmitter.IsClosed).Should(BeTrue())
		})

		It("can be called more than once", func() {
			hbEmitter.Close()
			Expect(hbEmitter.Close).ToNot(Panic())
		})
	})
})