public void TestFSAction()
        {
            var query = getEmptyQuery();

            Assert.Equal(query, WebHDFSHttpQueryParameter.SetFSAction(query, null));

            query = getEmptyQuery();
            WebHDFSHttpQueryParameter.SetFSAction(query, "---");
            Assert.Equal("---", query["fsaction"]);

            query = getEmptyQuery();
            WebHDFSHttpQueryParameter.SetFSAction(query, "r--");
            Assert.Equal("r--", query["fsaction"]);

            query = getEmptyQuery();
            WebHDFSHttpQueryParameter.SetFSAction(query, "rw-");
            Assert.Equal("rw-", query["fsaction"]);

            query = getEmptyQuery();
            WebHDFSHttpQueryParameter.SetFSAction(query, "rwx");
            Assert.Equal("rwx", query["fsaction"]);

            query = getEmptyQuery();
            WebHDFSHttpQueryParameter.SetFSAction(query, "--x");
            Assert.Equal("--x", query["fsaction"]);

            Assert.Throws <ArgumentException>(() => { WebHDFSHttpQueryParameter.SetPermission(query, "a--"); });
            Assert.Throws <ArgumentException>(() => { WebHDFSHttpQueryParameter.SetPermission(query, "----"); });
            Assert.Throws <ArgumentException>(() => { WebHDFSHttpQueryParameter.SetPermission(query, "rr-"); });
        }
        public void TestPermission()
        {
            var query = getEmptyQuery();

            Assert.Equal(query, WebHDFSHttpQueryParameter.SetPermission(query, null));

            query = getEmptyQuery();
            WebHDFSHttpQueryParameter.SetPermission(query, "1");
            Assert.Equal("1", query["permission"]);

            query = getEmptyQuery();
            WebHDFSHttpQueryParameter.SetPermission(query, "755");
            Assert.Equal("755", query["permission"]);

            Assert.Throws <ArgumentException>(() => { WebHDFSHttpQueryParameter.SetPermission(query, "800"); });
            Assert.Throws <ArgumentException>(() => { WebHDFSHttpQueryParameter.SetPermission(query, "11111"); });
        }