It("fails for error code 50x", func() {
				errorCodes := []int{500, 501, 599}
				for _, errorCode := range errorCodes {
					fakeClient.FakeHttpClient.DoRawHttpRequestInt = errorCode

					_, err := hardwareService.GetObject(123456)
					Expect(err).To(HaveOccurred())
				}
			})
		})
	})

	Context("#AllowAccessToNetworkStorage", func() {
		It("successfully allow access to NetworkStorage instance", func() {
			fakeClient.FakeHttpClient.DoRawHttpRequestResponse = []byte("true")
			allowed, err := hardwareService.AllowAccessToNetworkStorage(1234567, volume)
			Expect(err).ToNot(HaveOccurred())
			Expect(allowed).To(BeTrue())
		})

		Context("when HTTP client returns error codes 40x or 50x", func() {
			It("fails for error code 40x", func() {
				errorCodes := []int{400, 401, 499}
				for _, errorCode := range errorCodes {
					fakeClient.FakeHttpClient.DoRawHttpRequestInt = errorCode
					fakeClient.FakeHttpClient.DoRawHttpRequestResponse = []byte("fasle")

					_, err := hardwareService.AllowAccessToNetworkStorage(1234567, volume)
					Expect(err).To(HaveOccurred())
				}
			})