// Path: src/main/java/de/jeha/s3srv/common/http/Headers.java
// public class Headers {
// 
//     public static String AUTHORIZATION = "Authorization";
//     public static String CONNECTION = "Connection";
//     public static String CONTENT_MD5 = "Content-MD5";
//     public static String CONTENT_LENGTH = "Content-Length";
//     public static String CONTENT_TYPE = "Content-Type";
//     public static String DATE = "Date";
//     public static String ETAG = "ETag";
//     public static String HOST = "Host";
//     public static String LAST_MODIFIED = "Last-Modified";
//     public static String LOCATION = "Location";
// 
//     // a-amz
//     public static String X_AMZ_ACL = "x-amz-acl";
// 
// }
// 
// Path: src/main/java/de/jeha/s3srv/common/security/Credentials.java
// public class Credentials {
// 
//     private final static String ACCESS_KEY_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
//     private final static int ACCESS_KEY_LENGTH = 20;
// 
//     private final static String SECRET_KEY_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
//     private final static String SECRET_KEY_CHARS_WITH_SPECIAL_CHARS = SECRET_KEY_CHARS + "/+";
//     private final static int SECRET_KEY_LENGTH = 40;
// 
//     private final String accessKey;
//     private final String secretKey;
// 
//     public Credentials(String accessKey, String secretKey) {
//         this.accessKey = accessKey;
//         this.secretKey = secretKey;
//     }
// 
//     public String getAccessKey() {
//         return accessKey;
//     }
// 
//     public String getSecretKey() {
//         return secretKey;
//     }
// 
//     /**
//      * Generates a random pair of access key and secret key in a pretty naive way.
//      *
//      * @return randomly generated credentials
//      */
//     public static Credentials generateRandom() {
//         return generateRandom(true);
//     }
// 
//     /**
//      * Generates a random pair of access key and secret key in a pretty naive way.
//      *
//      * @param includeSpecialChars include special chars ('/' and '+') for secret keys
//      * @return randomly generated credentials
//      */
//     public static Credentials generateRandom(boolean includeSpecialChars) {
//         String accessKey = RandomStringUtils.random(ACCESS_KEY_LENGTH, ACCESS_KEY_CHARS);
//         String secretKey = RandomStringUtils.random(
//                 SECRET_KEY_LENGTH,
//                 includeSpecialChars ? SECRET_KEY_CHARS_WITH_SPECIAL_CHARS : SECRET_KEY_CHARS
//         );
// 
//         return new Credentials(accessKey, secretKey);
//     }
// 
//     public void print() {
//         System.out.println();
//         System.out.println("accessKey: " + accessKey);
//         System.out.println("secretKey: " + secretKey);
//         System.out.println();
//     }
// 
// }
// 
// Path: src/main/java/de/jeha/s3srv/model/S3Bucket.java
// public class S3Bucket {
// 
//     private final S3User owner;
//     private final String name;
//     private final Instant creationDate;
// 
//     public S3Bucket(S3User owner, String name) {
//         this.owner = owner;
//         this.name = name;
//         this.creationDate = Instant.now();
//     }
// 
//     public S3User getOwner() {
//         return owner;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public Instant getCreationDate() {
//         return creationDate;
//     }
// 
//     public boolean isOwnedBy(S3User user) {
//         return owner.getId().equals(user.getId());
//     }
// 
// }
// 
// Path: src/main/java/de/jeha/s3srv/model/S3User.java
// public class S3User {
// 
//     private final String id;
//     private final String displayName;
//     private final Credentials credentials;
// 
//     public S3User(String id, String displayName, Credentials credentials) {
//         this.id = id;
//         this.displayName = displayName;
//         this.credentials = credentials;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getDisplayName() {
//         return displayName;
//     }
// 
//     public Credentials getCredentials() {
//         return credentials;
//     }
// 
// }
// 
// Path: src/main/java/de/jeha/s3srv/storage/StorageBackend.java
// public interface StorageBackend extends HealthAware {
// 
//     List<S3Bucket> listBuckets();
// 
//     void createBucket(S3User user, String bucket);
// 
//     boolean doesBucketExist(String bucket);
// 
//     S3Bucket getBucket(String bucket);
// 
//     void deleteBucket(String bucket);
// 
//     S3Object createObject(String bucket, String key, InputStream contentStream, int contentLength,
//                           String expectedMD5, String contentType)
//             throws IOException, BadDigestException;
// 
//     boolean doesObjectExist(String bucket, String key);
// 
//     List<S3Object> listObjects(String bucket, int max);
// 
//     S3Object getObject(String bucket, String key);
// 
//     void deleteObject(String bucket, String key);
// 
//     /**
//      * @todo maybe separate storage backends for data and account data
//      */
//     S3User getUserByAccessId(String accessKey);
// 
// }


import de.jeha.s3srv.common.http.Headers;
import de.jeha.s3srv.common.security.Credentials;
import de.jeha.s3srv.model.S3Bucket;
import de.jeha.s3srv.model.S3User;
import de.jeha.s3srv.storage.StorageBackend;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Response;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.when;
package de.jeha.s3srv.operations.buckets;




/**
 * @author jenshadlich@googlemail.com
 */
public class GetBucketAclTest {

    @Test
// Path: src/main/java/de/jeha/s3srv/common/http/Headers.java
// public class Headers {
// 
//     public static String AUTHORIZATION = "Authorization";
//     public static String CONNECTION = "Connection";
//     public static String CONTENT_MD5 = "Content-MD5";
//     public static String CONTENT_LENGTH = "Content-Length";
//     public static String CONTENT_TYPE = "Content-Type";
//     public static String DATE = "Date";
//     public static String ETAG = "ETag";
//     public static String HOST = "Host";
//     public static String LAST_MODIFIED = "Last-Modified";
//     public static String LOCATION = "Location";
// 
//     // a-amz
//     public static String X_AMZ_ACL = "x-amz-acl";
// 
// }
// 
// Path: src/main/java/de/jeha/s3srv/common/security/Credentials.java
// public class Credentials {
// 
//     private final static String ACCESS_KEY_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
//     private final static int ACCESS_KEY_LENGTH = 20;
// 
//     private final static String SECRET_KEY_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
//     private final static String SECRET_KEY_CHARS_WITH_SPECIAL_CHARS = SECRET_KEY_CHARS + "/+";
//     private final static int SECRET_KEY_LENGTH = 40;
// 
//     private final String accessKey;
//     private final String secretKey;
// 
//     public Credentials(String accessKey, String secretKey) {
//         this.accessKey = accessKey;
//         this.secretKey = secretKey;
//     }
// 
//     public String getAccessKey() {
//         return accessKey;
//     }
// 
//     public String getSecretKey() {
//         return secretKey;
//     }
// 
//     /**
//      * Generates a random pair of access key and secret key in a pretty naive way.
//      *
//      * @return randomly generated credentials
//      */
//     public static Credentials generateRandom() {
//         return generateRandom(true);
//     }
// 
//     /**
//      * Generates a random pair of access key and secret key in a pretty naive way.
//      *
//      * @param includeSpecialChars include special chars ('/' and '+') for secret keys
//      * @return randomly generated credentials
//      */
//     public static Credentials generateRandom(boolean includeSpecialChars) {
//         String accessKey = RandomStringUtils.random(ACCESS_KEY_LENGTH, ACCESS_KEY_CHARS);
//         String secretKey = RandomStringUtils.random(
//                 SECRET_KEY_LENGTH,
//                 includeSpecialChars ? SECRET_KEY_CHARS_WITH_SPECIAL_CHARS : SECRET_KEY_CHARS
//         );
// 
//         return new Credentials(accessKey, secretKey);
//     }
// 
//     public void print() {
//         System.out.println();
//         System.out.println("accessKey: " + accessKey);
//         System.out.println("secretKey: " + secretKey);
//         System.out.println();
//     }
// 
// }
// 
// Path: src/main/java/de/jeha/s3srv/model/S3Bucket.java
// public class S3Bucket {
// 
//     private final S3User owner;
//     private final String name;
//     private final Instant creationDate;
// 
//     public S3Bucket(S3User owner, String name) {
//         this.owner = owner;
//         this.name = name;
//         this.creationDate = Instant.now();
//     }
// 
//     public S3User getOwner() {
//         return owner;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public Instant getCreationDate() {
//         return creationDate;
//     }
// 
//     public boolean isOwnedBy(S3User user) {
//         return owner.getId().equals(user.getId());
//     }
// 
// }
// 
// Path: src/main/java/de/jeha/s3srv/model/S3User.java
// public class S3User {
// 
//     private final String id;
//     private final String displayName;
//     private final Credentials credentials;
// 
//     public S3User(String id, String displayName, Credentials credentials) {
//         this.id = id;
//         this.displayName = displayName;
//         this.credentials = credentials;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getDisplayName() {
//         return displayName;
//     }
// 
//     public Credentials getCredentials() {
//         return credentials;
//     }
// 
// }
// 
// Path: src/main/java/de/jeha/s3srv/storage/StorageBackend.java
// public interface StorageBackend extends HealthAware {
// 
//     List<S3Bucket> listBuckets();
// 
//     void createBucket(S3User user, String bucket);
// 
//     boolean doesBucketExist(String bucket);
// 
//     S3Bucket getBucket(String bucket);
// 
//     void deleteBucket(String bucket);
// 
//     S3Object createObject(String bucket, String key, InputStream contentStream, int contentLength,
//                           String expectedMD5, String contentType)
//             throws IOException, BadDigestException;
// 
//     boolean doesObjectExist(String bucket, String key);
// 
//     List<S3Object> listObjects(String bucket, int max);
// 
//     S3Object getObject(String bucket, String key);
// 
//     void deleteObject(String bucket, String key);
// 
//     /**
//      * @todo maybe separate storage backends for data and account data
//      */
//     S3User getUserByAccessId(String accessKey);
// 
// }


// Path: src/test/java/de/jeha/s3srv/operations/buckets/GetBucketAclTest.java
import de.jeha.s3srv.common.http.Headers;
import de.jeha.s3srv.common.security.Credentials;
import de.jeha.s3srv.model.S3Bucket;
import de.jeha.s3srv.model.S3User;
import de.jeha.s3srv.storage.StorageBackend;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Response;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.when;

package de.jeha.s3srv.operations.buckets;




/**
 * @author jenshadlich@googlemail.com
 */
public class GetBucketAclTest {

    @Test
    public void test() {