public async void RegisterNoSuchPlugin()
        {
            using (var client = new VaultClient(TestVaultAddress))
            {
                client.VaultToken = TestRootToken;

                // Query for a plugin we expect to be there in a default setup
                var ex = await Assert.ThrowsAsync <VaultClientException>(async() =>
                                                                         await client.RegisterPluginAsync("no-such-plugin",
                                                                                                          MockPluginSha256, "no-such-plugin.exe"));

                Assert.Equal(HttpStatusCode.InternalServerError, ex.StatusCode);
            }
        }
        public async void RegisterBadShaPlugin()
        {
            using (var client = new VaultClient(TestVaultAddress))
            {
                client.VaultToken = TestRootToken;

                // Query for a plugin we expect to be there in a default setup
                //var ex = await Assert.ThrowsAsync<VaultClientException>(async () =>
                await client.RegisterPluginAsync("no-such-plugin",
                                                 new string(MockPluginSha256.ToCharArray().Reverse().ToArray()),
                                                 "mock-plugin.exe");

                //);

                // No exception is thrown now -- only when the plugin is used
                //Assert.Equal(HttpStatusCode.InternalServerError, ex.StatusCode);

                var info = await client.ReadPluginAsync("no-such-plugin");

                Assert.Equal("no-such-plugin", info.Data.Name);
            }
        }
        public async void RegisterPlugin()
        {
            using (var client = new VaultClient(TestVaultAddress))
            {
                client.VaultToken = TestRootToken;

                await client.RegisterPluginAsync("mock-plugin",
                                                 new string(MockPluginSha256.ToCharArray().Reverse().ToArray()),
                                                 "mock-plugin.exe");

                var info = await client.ReadPluginAsync("mock-plugin");

                Assert.Equal("mock-plugin", info.Data.Name);

                await client.RemovePluginAsync("mock-plugin");

                var ex = await Assert.ThrowsAsync <VaultClientException>(async() =>
                                                                         await client.ReadPluginAsync("mock-plugin"));

                Assert.Equal(HttpStatusCode.NotFound, ex.StatusCode);
            }
        }