It("responds with a relevant error message", func() {
				err := json.Unmarshal(garbageRequest, &receptor.TaskCreateRequest{})
				expectedBody, _ := json.Marshal(receptor.Error{
					Type:    receptor.InvalidJSON,
					Message: err.Error(),
				})
				Expect(responseRecorder.Body.String()).To(Equal(string(expectedBody)))
			})
		})
	})

	Describe("GetAll", func() {
		Context("when reading tasks from the BBS fails", func() {
			BeforeEach(func() {
				fakeBBS.TasksReturns([]models.Task{}, errors.New("Something went wrong"))
			})

			It("responds with an error", func() {
				handler.GetAll(responseRecorder, newTestRequest(""))
				Expect(responseRecorder.Code).To(Equal(http.StatusInternalServerError))
			})
		})

		Context("when reading tasks from BBS succeeds", func() {
			var domain1Task, domain2Task models.Task

			BeforeEach(func() {
				domain1Task = models.Task{
					TaskGuid: "task-guid-1",
					Domain:   "domain-1",