}) }) Context("when the Domain is blank", func() { BeforeEach(func() { actualLRPKey.Domain = "" }) It("returns a validation error", func() { Expect(actualLRPKey.Validate()).To(ConsistOf(models.ErrInvalidField{"domain"})) }) }) Context("when the Index is negative", func() { BeforeEach(func() { actualLRPKey.Index = -1 }) It("returns a validation error", func() { Expect(actualLRPKey.Validate()).To(ConsistOf(models.ErrInvalidField{"index"})) }) }) }) }) Describe("ActualLRPInstanceKey", func() { Describe("Validate", func() { var actualLRPInstanceKey models.ActualLRPInstanceKey Context("when both instance guid and cell id are specified", func() { It("returns nil", func() {