private void TestBuilderPathWithSpecifiedInterfaces()
        {
            AppEncryptionSessionFactory.IMetastoreStep metastoreStep =
                AppEncryptionSessionFactory.NewBuilder(TestProductId, TestSystemId);
            Assert.NotNull(metastoreStep);

            IMetastorePersistence <JObject> metastorePersistence = new MemoryPersistenceImpl <JObject>();

            AppEncryptionSessionFactory.ICryptoPolicyStep cryptoPolicyStep =
                metastoreStep.WithMetaStorePersistence(metastorePersistence);
            Assert.NotNull(cryptoPolicyStep);

            CryptoPolicy cryptoPolicy = new NeverExpiredCryptoPolicy();

            AppEncryptionSessionFactory.IKeyManagementServiceStep keyManagementServiceStep =
                cryptoPolicyStep.WithCryptoPolicy(cryptoPolicy);
            Assert.NotNull(keyManagementServiceStep);

            KeyManagementService keyManagementService = new StaticKeyManagementServiceImpl(TestMasterKey);

            AppEncryptionSessionFactory.IBuildStep buildStep =
                keyManagementServiceStep.WithKeyManagementService(keyManagementService);
            Assert.NotNull(buildStep);

            AppEncryptionSessionFactory sessionFactory = buildStep.Build();

            Assert.NotNull(sessionFactory);
        }
        private void TestBuilderPathWithPrebuiltInterfaces()
        {
            AppEncryptionSessionFactory.IMetastoreStep metastoreStep =
                AppEncryptionSessionFactory.NewBuilder(TestProductId, TestSystemId);
            Assert.NotNull(metastoreStep);

            AppEncryptionSessionFactory.ICryptoPolicyStep cryptoPolicyStep = metastoreStep.WithMemoryPersistence();
            Assert.NotNull(cryptoPolicyStep);

            AppEncryptionSessionFactory.IKeyManagementServiceStep keyManagementServiceStep =
                cryptoPolicyStep.WithNeverExpiredCryptoPolicy();
            Assert.NotNull(keyManagementServiceStep);

            AppEncryptionSessionFactory.IBuildStep buildStep =
                keyManagementServiceStep.WithStaticKeyManagementService(TestMasterKey);
            Assert.NotNull(buildStep);

            AppEncryptionSessionFactory sessionFactory = buildStep.Build();

            Assert.NotNull(sessionFactory);
        }