BeforeEach(func() { capacity := models.NewCellCapacity(128, 1024, 6) cellPresences = []models.CellPresence{ models.NewCellPresence("cell-id-0", "1.2.3.4", "the-zone", capacity), models.NewCellPresence("cell-id-1", "4.5.6.7", "the-zone", capacity), } }) JustBeforeEach(func() { handler.GetAll(responseRecorder, newTestRequest("")) }) Context("when reading Cells from BBS succeeds", func() { BeforeEach(func() { fakeBBS.CellsReturns(cellPresences, nil) }) It("call the BBS to retrieve the actual LRPs", func() { Expect(fakeBBS.CellsCallCount()).To(Equal(1)) }) It("responds with 200 Status OK", func() { Expect(responseRecorder.Code).To(Equal(http.StatusOK)) }) It("returns a list of cell presence responses", func() { response := []receptor.CellResponse{} err := json.Unmarshal(responseRecorder.Body.Bytes(), &response) Expect(err).NotTo(HaveOccurred())