@@ -0,0 +1,1373 @@
+package de.jeha.s3srv.operations.service;%0A%0Aimport de.jeha.s3srv.common.http.Headers;%0Aimport de.jeha.s3srv.common.security.Credentials;%0Aimport de.jeha.s3srv.model.S3User;%0Aimport de.jeha.s3srv.storage.StorageBackend;%0Aimport org.junit.Test;%0Aimport org.mockito.Mockito;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.ws.rs.core.Response;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.mockito.Mockito.*;%0A%0A/**%0A * @author jenshadlich@googlemail.com%0A */%0Apublic class ListBucketsTest %7B%0A%0A    @Test%0A    public void test() %7B%0A        final HttpServletRequest mockedRequest = Mockito.mock(HttpServletRequest.class);%0A        when(mockedRequest.getHeader(Headers.AUTHORIZATION)).thenReturn(%22AWS foo:s63buzYAu2AUptL/y4N7fuX0/L0=%22);%0A        when(mockedRequest.getHeader(Headers.DATE)).thenReturn(%22Wed, 06 Jul 2016 15:53:17 GMT%22);%0A        when(mockedRequest.getMethod()).thenReturn(%22MOCK%22);%0A%0A        final S3User s3user = new S3User(%221%22, %22foo%22, new Credentials(%22foo%22, %22bar%22));%0A        final StorageBackend mockedStorageBackend = Mockito.mock(StorageBackend.class);%0A        when(mockedStorageBackend.getUserByAccessId(%22foo%22)).thenReturn(s3user);%0A%0A        Response response = new ListBuckets(mockedStorageBackend).listBuckets(mockedRequest);%0A%0A        verify(mockedStorageBackend, times(1)).listBuckets();%0A        assertEquals(200, response.getStatus());%0A    %7D%0A%0A%7D%0A

add test