public static String getS3EncryptionContext(String bucket, Configuration conf)
      throws IOException {
    // look up the per-bucket value of the encryption context
    String encryptionContext = S3AUtils.lookupBucketSecret(bucket, conf, S3_ENCRYPTION_CONTEXT);
    if (encryptionContext == null) {
      // look up the global value of the encryption context
      encryptionContext = S3AUtils.lookupPassword(null, conf, S3_ENCRYPTION_CONTEXT);
    }
    if (encryptionContext == null) {
      // no encryption context, return ""
      return "";
    }
    return encryptionContext;
  }
@Test
  public void testGetS3EncryptionContextNoSet() throws IOException {
    Configuration configuration = new Configuration(false);
    final String result = S3AEncryption.getS3EncryptionContext("bucket1", configuration);
    Assert.assertEquals("", result);
  }