@@ -0,0 +1,1284 @@
+package de.jeha.s3srv.storage.backends;%0A%0Aimport de.jeha.s3srv.errors.BadDigestException;%0Aimport de.jeha.s3srv.storage.S3Object;%0Aimport de.jeha.s3srv.storage.StorageBackend;%0Aimport org.apache.commons.io.IOUtils;%0Aimport org.junit.Test;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.IOException;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotNull;%0A%0A/**%0A * @author jenshadlich@googlemail.com%0A */%0Apublic class InMemoryStorageBackendTest %7B%0A%0A    @Test%0A    public void test() throws IOException, BadDigestException %7B%0A        StorageBackend storageBackend = new InMemoryStorageBackend();%0A%0A        final String content = %22content%22;%0A        final S3Object object = storageBackend.createObject(%0A                %22test-bucket%22,%0A                %22test-object%22,%0A                new ByteArrayInputStream(content.getBytes(%22UTF-8%22)),%0A                content.length(),%0A                %22mgNkuembtIDdJeHwKEyFVQ==%22,%0A                %22text/plain%22);%0A%0A        assertNotNull(object);%0A        // retrieve once%0A        assertEquals(%22content%22, IOUtils.toString(object.getInputStream(), %22UTF-8%22));%0A        // retrieve a 2nd time to check that the input stream was not consumed%0A        assertEquals(%22content%22, IOUtils.toString(object.getInputStream(), %22UTF-8%22));%0A    %7D%0A%7D%0A

attach test case