void runCQTest()
        {
            CacheHelper.SetupJavaServers(true, "remotequeryN.xml");

            CacheHelper.StartJavaLocator(1, "GFELOC");
            Util.Log("Locator started");

            DummyAuthorization3 da = new DummyAuthorization3();

            string authenticator = da.Authenticator;
            string authInit      = da.AuthInit;
            string accessorPP    = da.AuthenticatorPP;

            Util.Log("testAllowPutsGets: Using authinit: " + authInit);
            Util.Log("testAllowPutsGets: Using authenticator: " + authenticator);
            Util.Log("testAllowPutsGets: Using accessorPP: " + accessorPP);

            // Start servers with all required properties
            string serverArgs = SecurityTestUtil.GetServerArgs(authenticator,
                                                               null, accessorPP, null, null);

            // Start the two servers.
            CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1, serverArgs);
            Util.Log("Cacheserver 1 started.");
            CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1, serverArgs);
            Util.Log("Cacheserver 2 started.");

            // Start client1 with valid CREATE credentials, this index will be used to authorzie the user
            Properties <string, string> createCredentials = da.GetValidCredentials(4);

            Util.Log("runCQTest: ");
            m_client1.Call(SecurityTestUtil.CreateClientMU2, RegionName_CQ,
                           CacheHelper.Locators, authInit, (Properties <string, string>)null, true, true);

            m_client2.Call(SecurityTestUtil.CreateClientMU, RegionName_CQ,
                           CacheHelper.Locators, authInit, (Properties <string, string>)null, true);

            // Perform some put operations from client1
            m_client1.Call(registerCQ, createCredentials, false);

            // Verify that the gets succeed
            m_client2.Call(doCQPut, createCredentials);

            m_client1.Call(verifyCQEvents, true, CqOperationType.OP_TYPE_CREATE);

            m_client1.Call(CloseUserCache, false);
            m_client1.Call(Close);
            m_client2.Call(Close);

            CacheHelper.StopJavaServer(1);
            // CacheHelper.StopJavaServer(2);


            CacheHelper.StopJavaLocator(1);

            CacheHelper.ClearEndpoints();
            CacheHelper.ClearLocators();
        }
        //private static string DurableClientId2 = "DurableClientId2";

        void runDurableCQTest(bool logicalCacheClose, bool durableCQ, bool whetherResult)
        {
            CacheHelper.SetupJavaServers(true, "remotequeryN.xml");

            CacheHelper.StartJavaLocator(1, "GFELOC");
            Util.Log("Locator started");

            DummyAuthorization3 da = new DummyAuthorization3();

            string authenticator = da.Authenticator;
            string authInit      = da.AuthInit;
            string accessorPP    = da.AuthenticatorPP;

            Util.Log("testAllowPutsGets: Using authinit: " + authInit);
            Util.Log("testAllowPutsGets: Using authenticator: " + authenticator);
            Util.Log("testAllowPutsGets: Using accessorPP: " + accessorPP);

            // Start servers with all required properties
            string serverArgs = SecurityTestUtil.GetServerArgs(authenticator,
                                                               null, accessorPP, null, null);

            // Start the two servers.
            CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1, serverArgs);
            Util.Log("Cacheserver 1 started.");
            CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1, serverArgs);
            Util.Log("Cacheserver 2 started.");

            // Start client1 with valid CREATE credentials, this index will be used to authorzie the user
            Properties <string, string> createCredentials = da.GetValidCredentials(4);

            Util.Log("runCQTest: ");

            /*
             * regionName, string endpoints, string locators,
             * authInit, Properties credentials, bool pool, bool locator, bool isMultiuser, bool notificationEnabled, string durableClientId)
             */
            m_client1.Call(SecurityTestUtil.CreateMUDurableClient, RegionName_CQ,
                           CacheHelper.Locators, authInit, DurableClientId1, true, true);

            m_client2.Call(SecurityTestUtil.CreateClientMU, RegionName_CQ,
                           CacheHelper.Locators, authInit, (Properties <string, string>)null, true);

            m_client1.Call(ReadyForEvents2);

            // Perform some put operations from client1
            m_client1.Call(registerCQ, createCredentials, durableCQ);


            Properties <string, string> createCredentials2 = da.GetValidCredentials(3);

            // Verify that the gets succeed
            m_client2.Call(doCQPut, createCredentials2);

            //close cache client-1
            m_client1.Call(verifyCQEvents, true, CqOperationType.OP_TYPE_CREATE);

            Thread.Sleep(10000);

            Util.Log("Before calling CloseUserCache: " + logicalCacheClose);
            if (logicalCacheClose)
            {
                m_client1.Call(CloseUserCache, logicalCacheClose);
            }

            m_client1.Call(CloseKeepAlive);
            //put again from other client
            m_client2.Call(doCQPut, createCredentials2);

            //client-1 will up again
            m_client1.Call(SecurityTestUtil.CreateMUDurableClient, RegionName_CQ,
                           CacheHelper.Locators, authInit, DurableClientId1, true, true);

            // Perform some put operations from client1
            m_client1.Call(registerCQ, createCredentials, durableCQ);

            m_client1.Call(ReadyForEvents2);
            Thread.Sleep(20000);
            m_client1.Call(verifyCQEvents, whetherResult, CqOperationType.OP_TYPE_UPDATE);


            m_client1.Call(Close);

            m_client2.Call(Close);

            CacheHelper.StopJavaServer(1);
            // CacheHelper.StopJavaServer(2);


            CacheHelper.StopJavaLocator(1);

            CacheHelper.ClearEndpoints();
            CacheHelper.ClearLocators();
        }