public static CloudConfiguration buildCloudConfigurationForStorage(Map<String, String> properties) {
        return buildCloudConfigurationForStorage(properties, false);
    }
@Test
    public void testHDFSCloudConfiguration() {
        Map<String, String> map = new HashMap<String, String>() {
            {
                put(CloudConfigurationConstants.HDFS_AUTHENTICATION, "simple");
                put(CloudConfigurationConstants.HDFS_USERNAME, "XX");
                put(CloudConfigurationConstants.HDFS_PASSWORD, "XX");
            }
        };
        CloudConfiguration cc = CloudConfigurationFactory.buildCloudConfigurationForStorage(map);
        Assert.assertEquals(cc.getCloudType(), CloudType.HDFS);
        TCloudConfiguration tc = new TCloudConfiguration();
        cc.toThrift(tc);
        Configuration conf = new Configuration();
        cc.applyToConfiguration(conf);
        cc.toFileStoreInfo();
        Assert.assertEquals(cc.toConfString(),
                "HDFSCloudConfiguration{resources='', jars='', hdpuser='XX', cred=HDFSCloudCredential{authentication='simple', " +
                        "username='XX', password='XX', krbPrincipal='', krbKeyTabFile='', krbKeyTabData=''}}");

        map.clear();
        cc = CloudConfigurationFactory.buildCloudConfigurationForStorage(map);
        Assert.assertEquals(CloudType.DEFAULT, cc.getCloudType());

        cc = CloudConfigurationFactory.buildCloudConfigurationForStorage(map, true);
        Assert.assertEquals(CloudType.HDFS, cc.getCloudType());
    }