public static CloudConfiguration buildCloudConfigurationForStorage(Map<String, String> properties) {
        return buildCloudConfigurationForStorage(properties, false);
    }
@Test
    public void testAWSCloudConfiguration() {
        Map<String, String> map = new HashMap<String, String>() {
            {
                put(CloudConfigurationConstants.AWS_S3_ACCESS_KEY, "XX");
                put(CloudConfigurationConstants.AWS_S3_SECRET_KEY, "YY");
                put(CloudConfigurationConstants.AWS_S3_REGION, "ZZ");
            }
        };
        CloudConfiguration cc = CloudConfigurationFactory.buildCloudConfigurationForStorage(map);
        Assert.assertEquals(cc.getCloudType(), CloudType.AWS);
        TCloudConfiguration tc = new TCloudConfiguration();
        cc.toThrift(tc);
        Assert.assertEquals(tc.getCloud_properties().get(CloudConfigurationConstants.AWS_S3_ENABLE_SSL), "true");
        Assert.assertEquals(tc.getCloud_properties().get(CloudConfigurationConstants.AWS_S3_ENABLE_PATH_STYLE_ACCESS),
                "false");
        Configuration conf = new Configuration();
        cc.applyToConfiguration(conf);
        cc.toFileStoreInfo();
        Assert.assertEquals(cc.toConfString(),
                "AWSCloudConfiguration{resources='', jars='', hdpuser='', " +
                        "cred=AWSCloudCredential{useAWSSDKDefaultBehavior=false, useInstanceProfile=false, " +
                        "accessKey='XX', secretKey='YY', sessionToken='', iamRoleArn='', stsRegion='', " +
                        "stsEndpoint='', externalId='', region='ZZ', endpoint=''}, " +
                        "enablePathStyleAccess=false, enableSSL=true}");
    }