public async Task CantGetPackageWhenServiceIsDown()
        {
            mockBlockService.Setup(m => m.InvokeGet(HyperledgerConsts.MyPackagesUrl(TestJsonObjectConsts.trader1ID)))
            .ThrowsAsync(new HttpRequestException());
            mockBlockService.Setup(m => m.InvokeGet(HyperledgerConsts.TraderQueryURL(TestJsonObjectConsts.trader1ID)))
            .ReturnsAsync(TestJsonObjectConsts.trader1);
            mockBlockService.Setup(m => m.InvokePostAuthentication(FlaskConsts.LoginUrl, JsonConvert.SerializeObject(user)))
            .ReturnsAsync(TestJsonObjectConsts.trader1AuthenticationMessage);

            await clientWithMock.Login(user);

            List <Package> results = await clientWithMock.GetMyPackages();

            Assert.IsNull(results);
        }
        public async Task GetMyPackagesMethodWillInvokeMyPackagesUrl()
        {
            mockBlockService.Setup(m => m.InvokeGet(HyperledgerConsts.MyPackagesUrl(TestJsonObjectConsts.trader1ID)))
            .ReturnsAsync("[]");
            mockBlockService.Setup(m => m.InvokeGet(HyperledgerConsts.TraderQueryURL(TestJsonObjectConsts.trader1ID)))
            .ReturnsAsync(TestJsonObjectConsts.trader1);
            mockBlockService.Setup(m => m.InvokePostAuthentication(FlaskConsts.LoginUrl, JsonConvert.SerializeObject(user)))
            .ReturnsAsync(TestJsonObjectConsts.trader1AuthenticationMessage);

            await clientWithMock.Login(user);

            List <Package> results = await clientWithMock.GetMyPackages();

            mockBlockService.Verify(m => m.InvokeGet(HyperledgerConsts.MyPackagesUrl(TestJsonObjectConsts.trader1ID)));
        }