public void ThenEncryptObjectPublishShouldReturnSuccessCodeAndInfo()
        {
            isEncryptObjectPublished = false;
            Pubnub pubnub = new Pubnub("demo", "demo", "", "enigma", false);
            string channel = "my/channel";
            object message = new SecretCustomClass();
            messageObjectForEncryptPublish = JsonConvert.SerializeObject(message);

            pubnub.publish<string>(channel, message, ReturnSuccessEncryptObjectPublishCodeCallback);
            mreEncryptObjectPub.WaitOne(310 * 1000);

            if (!isEncryptObjectPublished)
            {
                Assert.IsTrue(isEncryptObjectPublished, "Encrypt Object Publish Failed");
            }
            else
            {
                pubnub.detailedHistory<string>(channel, -1, encryptObjectPublishTimetoken, -1, false, CaptureEncryptObjectDetailedHistoryCallback);
                mreEncryptObjectDH.WaitOne(310 * 1000);
                Assert.IsTrue(isEncryptObjectDH, "Unable to match the successful encrypt object Publish");
            }
        }
        public void ThenEncryptObjectPublishShouldReturnSuccessCodeAndInfo()
        {
            isEncryptObjectPublished = false;
            Pubnub pubnub  = new Pubnub("demo", "demo", "", "enigma", false);
            string channel = "my/channel";
            object message = new SecretCustomClass();

            messageObjectForEncryptPublish = JsonConvert.SerializeObject(message);

            pubnub.publish <string>(channel, message, ReturnSuccessEncryptObjectPublishCodeCallback);
            mreEncryptObjectPub.WaitOne(310 * 1000);

            if (!isEncryptObjectPublished)
            {
                Assert.IsTrue(isEncryptObjectPublished, "Encrypt Object Publish Failed");
            }
            else
            {
                pubnub.detailedHistory <string>(channel, -1, encryptObjectPublishTimetoken, -1, false, CaptureEncryptObjectDetailedHistoryCallback);
                mreEncryptObjectDH.WaitOne(310 * 1000);
                Assert.IsTrue(isEncryptObjectDH, "Unable to match the successful encrypt object Publish");
            }
        }