}) AfterEach(func() { fakeServer.Close() }) Describe("StopLRPInstance", func() { const cellAddr = "cell.example.com" var stopErr error var actualLRP = models.ActualLRP{ ActualLRPKey: models.NewActualLRPKey("some-process-guid", 2, "test-domain"), ActualLRPInstanceKey: models.NewActualLRPInstanceKey("some-instance-guid", "some-cell-id"), } JustBeforeEach(func() { stopErr = client.StopLRPInstance(actualLRP.ActualLRPKey, actualLRP.ActualLRPInstanceKey) }) Context("when the request is successful", func() { BeforeEach(func() { fakeServer.AppendHandlers( ghttp.CombineHandlers( ghttp.VerifyRequest("POST", "/v1/lrps/some-process-guid/instances/some-instance-guid/stop"), ghttp.RespondWith(http.StatusAccepted, ""), ), ) }) It("makes the request and does not return an error", func() { Expect(stopErr).NotTo(HaveOccurred()) Expect(fakeServer.ReceivedRequests()).To(HaveLen(1))