public void ClientCredentialsGrantType_LoginTest()
        {
            try
            {
                ClientSecrets clientSecrets = new ClientSecrets
                                              {
                                                  ApiKey = RestApiTests.ClientId,
                                                  ApiSecret = RestApiTests.ClientSecret,
                                                  OAuthTokenEndPoint = RestApiTests.OAuthServerTokenEndPoint,
                                                  BaseUrl = RestApiTests.VaultApiBaseUrl,
                                                  ApiVersion = RestApiTests.ApiVersion,
                                                  CustomerAlias = RestApiTests.CustomerAlias,
                                                  DatabaseAlias = RestApiTests.DatabaseAlias,
                                                  Scope = RestApiTests.Scope
                                              };

                VaultApi vaultApi = new VaultApi(clientSecrets);

                Assert.IsNotNull(vaultApi);
            }
            catch (Exception ex)
            {
                string test = ex.Message;
            }
        }
        public void GetDocumentRevisionFile()
        {
            try
            {
                ClientSecrets clientSecrets = new ClientSecrets
                {
                    ApiKey = RestApiTests.ClientId,
                    ApiSecret = RestApiTests.ClientSecret,
                    OAuthTokenEndPoint = RestApiTests.OAuthServerTokenEndPoint,
                    BaseUrl = RestApiTests.VaultApiBaseUrl,
                    ApiVersion = RestApiTests.ApiVersion,
                    CustomerAlias = RestApiTests.CustomerAlias,
                    DatabaseAlias = RestApiTests.DatabaseAlias,
                    Scope = RestApiTests.Scope
                };

                VaultApi vaultApi = new VaultApi(clientSecrets);

                Assert.IsNotNull(vaultApi);

                Guid fileId = new Guid("8d57c716-40e5-e411-beee-93df0d4ae3b6");

                string filePath = string.Format(@"C:\Users\tod.olsen\Downloads\{0}", "test2.docx");

                File.Delete(filePath);

                using (Stream stream = vaultApi.Files.GetStream(fileId))
                using (FileStream fs = new FileStream(filePath, FileMode.OpenOrCreate, FileAccess.Write))
                {
                    int count = 0;
                    do
                    {
                        byte[] buf = new byte[102400];
                        count = stream.Read(buf, 0, 102400);
                        fs.Write(buf, 0, count);
                    } while (count > 0);
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
            }
        }