StorageBucket bucket = createBucketForTest("testBucketLifecycleConfiguration");
String bucketName = bucket.getName();
try {
// No config rules initially for bucket
LifecycleConfig config = s3Service.getLifecycleConfig(bucketName);
assertNull(config);
// Create Rule with Expiration by Days
LifecycleConfig newConfig = new LifecycleConfig();
Rule newRule = newConfig.newRule("rule-1", "/nothing", Boolean.TRUE);
Expiration expiration = newRule.newExpiration();
expiration.setDays(7);
// Apply initial Rule
s3Service.setLifecycleConfig(bucketName, newConfig);