You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2014/10/13 13:54:43 UTC

svn commit: r1631356 [9/9] - in /sling/trunk: ./ testing/jcr-mock/ testing/jcr-mock/src/ testing/jcr-mock/src/main/ testing/jcr-mock/src/main/java/ testing/jcr-mock/src/main/java/org/ testing/jcr-mock/src/main/java/org/apache/ testing/jcr-mock/src/main...

Added: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockHttpSessionTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockHttpSessionTest.java?rev=1631356&view=auto
==============================================================================
--- sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockHttpSessionTest.java (added)
+++ sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockHttpSessionTest.java Mon Oct 13 11:54:39 2014
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.testing.mock.sling.servlet;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class MockHttpSessionTest {
+
+    private HttpSession httpSession;
+
+    @Before
+    public void setUp() throws Exception {
+        this.httpSession = new MockHttpSession();
+    }
+
+    @Test
+    public void testServletContext() {
+        assertNotNull(this.httpSession.getServletContext());
+    }
+
+    @Test
+    public void testId() {
+        assertNotNull(this.httpSession.getId());
+    }
+
+    @Test
+    public void testCreationTime() {
+        assertNotNull(this.httpSession.getCreationTime());
+    }
+
+    @Test
+    public void testAttributes() {
+        this.httpSession.setAttribute("attr1", "value1");
+        assertTrue(this.httpSession.getAttributeNames().hasMoreElements());
+        assertEquals("value1", this.httpSession.getAttribute("attr1"));
+        this.httpSession.removeAttribute("attr1");
+        assertFalse(this.httpSession.getAttributeNames().hasMoreElements());
+    }
+
+    @SuppressWarnings("deprecation")
+    @Test
+    public void testValues() {
+        this.httpSession.putValue("attr1", "value1");
+        assertEquals(1, this.httpSession.getValueNames().length);
+        assertEquals("value1", this.httpSession.getValue("attr1"));
+        this.httpSession.removeValue("attr1");
+        assertEquals(0, this.httpSession.getValueNames().length);
+    }
+
+}

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockHttpSessionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockHttpSessionTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Oct 13 11:54:39 2014
@@ -0,0 +1 @@
+LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockHttpSessionTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockRequestPathInfoTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockRequestPathInfoTest.java?rev=1631356&view=auto
==============================================================================
--- sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockRequestPathInfoTest.java (added)
+++ sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockRequestPathInfoTest.java Mon Oct 13 11:54:39 2014
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.testing.mock.sling.servlet;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class MockRequestPathInfoTest {
+
+    private MockRequestPathInfo requestPathInfo;
+
+    @Before
+    public void setUp() throws Exception {
+        this.requestPathInfo = new MockRequestPathInfo();
+    }
+
+    @Test
+    public void testExtension() {
+        assertNull(this.requestPathInfo.getExtension());
+        this.requestPathInfo.setExtension("ext");
+        assertEquals("ext", this.requestPathInfo.getExtension());
+    }
+
+    @Test
+    public void testResourcePath() {
+        assertNull(this.requestPathInfo.getResourcePath());
+        this.requestPathInfo.setResourcePath("/path");
+        assertEquals("/path", this.requestPathInfo.getResourcePath());
+    }
+
+    @Test
+    public void testSelector() {
+        assertNull(this.requestPathInfo.getSelectorString());
+        assertEquals(0, this.requestPathInfo.getSelectors().length);
+        this.requestPathInfo.setSelectorString("aa.bb");
+        assertEquals("aa.bb", this.requestPathInfo.getSelectorString());
+        assertEquals(2, this.requestPathInfo.getSelectors().length);
+        assertArrayEquals(new String[] { "aa", "bb" }, this.requestPathInfo.getSelectors());
+    }
+
+    @Test
+    public void testSuffix() {
+        assertNull(this.requestPathInfo.getSuffix());
+        this.requestPathInfo.setSuffix("/suffix");
+        assertEquals("/suffix", this.requestPathInfo.getSuffix());
+    }
+
+}

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockRequestPathInfoTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockRequestPathInfoTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Oct 13 11:54:39 2014
@@ -0,0 +1 @@
+LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockRequestPathInfoTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockServletContextTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockServletContextTest.java?rev=1631356&view=auto
==============================================================================
--- sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockServletContextTest.java (added)
+++ sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockServletContextTest.java Mon Oct 13 11:54:39 2014
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.testing.mock.sling.servlet;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.servlet.ServletContext;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class MockServletContextTest {
+
+    private ServletContext servletContext;
+
+    @Before
+    public void setUp() throws Exception {
+        this.servletContext = new MockServletContext();
+    }
+
+    @Test
+    public void testGetMimeType() {
+        assertEquals("application/octet-stream", this.servletContext.getMimeType("any"));
+    }
+
+}

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockServletContextTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockServletContextTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Oct 13 11:54:39 2014
@@ -0,0 +1 @@
+LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockServletContextTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequestTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequestTest.java?rev=1631356&view=auto
==============================================================================
--- sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequestTest.java (added)
+++ sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequestTest.java Mon Oct 13 11:54:39 2014
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.testing.mock.sling.servlet;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Calendar;
+import java.util.Enumeration;
+import java.util.LinkedHashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang3.CharEncoding;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.servlets.HttpConstants;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class MockSlingHttpServletRequestTest {
+
+    @Mock
+    private ResourceResolver resourceResolver;
+    @Mock
+    private Resource resource;
+
+    private MockSlingHttpServletRequest request;
+
+    @Before
+    public void setUp() throws Exception {
+        request = new MockSlingHttpServletRequest(resourceResolver);
+    }
+
+    @Test
+    public void testResourceResolver() {
+        assertSame(resourceResolver, request.getResourceResolver());
+    }
+
+    @Test
+    public void testDefaultResourceResolver() {
+        assertNotNull(new MockSlingHttpServletRequest().getResourceResolver());
+    }
+
+    @Test
+    public void testSession() {
+        HttpSession session = request.getSession(false);
+        assertNull(session);
+        session = request.getSession();
+        assertNotNull(session);
+    }
+
+    @Test
+    public void testRequestPathInfo() {
+        assertNotNull(request.getRequestPathInfo());
+    }
+
+    @Test
+    public void testAttributes() {
+        request.setAttribute("attr1", "value1");
+        assertTrue(request.getAttributeNames().hasMoreElements());
+        assertEquals("value1", request.getAttribute("attr1"));
+        request.removeAttribute("attr1");
+        assertFalse(request.getAttributeNames().hasMoreElements());
+    }
+
+    @Test
+    public void testResource() {
+        assertNull(request.getResource());
+        request.setResource(resource);
+        assertSame(resource, request.getResource());
+    }
+
+    @Test
+    public void testContextPath() {
+        assertNull(request.getContextPath());
+        request.setContextPath("/ctx");
+        assertEquals("/ctx", request.getContextPath());
+    }
+
+    @Test
+    public void testLocale() {
+        assertEquals(Locale.US, request.getLocale());
+    }
+
+    @Test
+    public void testQueryString() throws UnsupportedEncodingException {
+        assertNull(request.getQueryString());
+        assertEquals(0, request.getParameterMap().size());
+        assertFalse(request.getParameterNames().hasMoreElements());
+
+        request.setQueryString("param1=123&param2=" + URLEncoder.encode("äöü߀!:!", CharEncoding.UTF_8)
+                + "&param3=a&param3=b");
+
+        assertNotNull(request.getQueryString());
+        assertEquals(3, request.getParameterMap().size());
+        assertTrue(request.getParameterNames().hasMoreElements());
+        assertEquals("123", request.getParameter("param1"));
+        assertEquals("äöü߀!:!", request.getParameter("param2"));
+        assertArrayEquals(new String[] { "a", "b" }, request.getParameterValues("param3"));
+
+        Map<String, Object> paramMap = new LinkedHashMap<String, Object>();
+        paramMap.put("p1", "a");
+        paramMap.put("p2", new String[] { "b", "c" });
+        paramMap.put("p3", null);
+        paramMap.put("p4", new String[] { null });
+        paramMap.put("p5", 22);
+        request.setParameterMap(paramMap);
+
+        assertEquals("p1=a&p2=b&p2=c&p4=&p5=22", request.getQueryString());
+    }
+
+    @Test
+    public void testSchemeSecure() {
+        assertEquals("http", request.getScheme());
+        assertFalse(request.isSecure());
+
+        request.setScheme("https");
+        assertEquals("https", request.getScheme());
+        assertTrue(request.isSecure());
+    }
+
+    @Test
+    public void testServerNamePort() {
+        assertEquals("localhost", request.getServerName());
+        assertEquals(80, request.getServerPort());
+
+        request.setServerName("myhost");
+        request.setServerPort(12345);
+        assertEquals("myhost", request.getServerName());
+        assertEquals(12345, request.getServerPort());
+    }
+
+    @Test
+    public void testMethod() {
+        assertEquals(HttpConstants.METHOD_GET, request.getMethod());
+
+        request.setMethod(HttpConstants.METHOD_POST);
+        assertEquals(HttpConstants.METHOD_POST, request.getMethod());
+    }
+
+    @Test
+    public void testHeaders() {
+        assertFalse(request.getHeaderNames().hasMoreElements());
+
+        Calendar calendar = Calendar.getInstance();
+        calendar.set(Calendar.MILLISECOND, 0);
+        long dateValue = calendar.getTimeInMillis();
+
+        request.addHeader("header1", "value1");
+        request.addIntHeader("header2", 5);
+        request.addDateHeader("header3", dateValue);
+
+        assertEquals("value1", request.getHeader("header1"));
+        assertEquals(5, request.getIntHeader("header2"));
+        assertEquals(dateValue, request.getDateHeader("header3"));
+
+        request.setHeader("header1", "value2");
+        request.addIntHeader("header2", 10);
+
+        Enumeration<String> header1Values = request.getHeaders("header1");
+        assertEquals("value2", header1Values.nextElement());
+        assertFalse(header1Values.hasMoreElements());
+
+        Enumeration<String> header2Values = request.getHeaders("header2");
+        assertEquals("5", header2Values.nextElement());
+        assertEquals("10", header2Values.nextElement());
+        assertFalse(header2Values.hasMoreElements());
+    }
+
+    @Test
+    public void testCookies() {
+        assertNull(request.getCookies());
+
+        request.addCookie(new Cookie("cookie1", "value1"));
+        request.addCookie(new Cookie("cookie2", "value2"));
+
+        assertEquals("value1", request.getCookie("cookie1").getValue());
+
+        Cookie[] cookies = request.getCookies();
+        assertEquals(2, cookies.length);
+        assertEquals("value1", cookies[0].getValue());
+        assertEquals("value2", cookies[1].getValue());
+    }
+
+}

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequestTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequestTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Oct 13 11:54:39 2014
@@ -0,0 +1 @@
+LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequestTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletResponseTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletResponseTest.java?rev=1631356&view=auto
==============================================================================
--- sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletResponseTest.java (added)
+++ sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletResponseTest.java Mon Oct 13 11:54:39 2014
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.testing.mock.sling.servlet;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.CharEncoding;
+import org.junit.Before;
+import org.junit.Test;
+
+public class MockSlingHttpServletResponseTest {
+
+    private MockSlingHttpServletResponse response;
+
+    @Before
+    public void setUp() throws Exception {
+        this.response = new MockSlingHttpServletResponse();
+    }
+
+    @Test
+    public void testContentTypeCharset() throws Exception {
+        assertNull(response.getContentType());
+        assertEquals(CharEncoding.ISO_8859_1, response.getCharacterEncoding());
+
+        response.setContentType("text/plain;charset=UTF-8");
+        assertEquals("text/plain;charset=UTF-8", response.getContentType());
+        assertEquals(CharEncoding.UTF_8, response.getCharacterEncoding());
+    }
+
+    @Test
+    public void testContentLength() throws Exception {
+        assertEquals(0, response.getContentLength());
+
+        response.setContentLength(55);
+        assertEquals(55, response.getContentLength());
+    }
+
+    @Test
+    public void testHeaders() throws Exception {
+        assertEquals(0, response.getHeaderNames().size());
+
+        response.addHeader("header1", "value1");
+        response.addIntHeader("header2", 5);
+        response.addDateHeader("header3", System.currentTimeMillis());
+
+        assertEquals(3, response.getHeaderNames().size());
+        assertTrue(response.containsHeader("header1"));
+        assertEquals("value1", response.getHeader("header1"));
+        assertEquals("5", response.getHeader("header2"));
+        assertNotNull(response.getHeader("header3"));
+
+        response.setHeader("header1", "value2");
+        response.addIntHeader("header2", 10);
+
+        assertEquals(3, response.getHeaderNames().size());
+
+        Collection<String> header1Values = response.getHeaders("header1");
+        assertEquals(1, header1Values.size());
+        assertEquals("value2", header1Values.iterator().next());
+
+        Collection<String> header2Values = response.getHeaders("header2");
+        assertEquals(2, header2Values.size());
+        Iterator<String> header2Iterator = header2Values.iterator();
+        assertEquals("5", header2Iterator.next());
+        assertEquals("10", header2Iterator.next());
+
+        response.reset();
+        assertEquals(0, response.getHeaderNames().size());
+    }
+
+    @Test
+    public void testRedirect() throws Exception {
+        response.sendRedirect("/location.html");
+        assertEquals(HttpServletResponse.SC_MOVED_TEMPORARILY, response.getStatus());
+        assertEquals("/location.html", response.getHeader("Location"));
+    }
+
+    @Test
+    public void testSendError() throws Exception {
+        response.sendError(HttpServletResponse.SC_NOT_FOUND);
+        assertEquals(HttpServletResponse.SC_NOT_FOUND, response.getStatus());
+    }
+
+    @Test
+    public void testSetStatus() throws Exception {
+        assertEquals(HttpServletResponse.SC_OK, response.getStatus());
+
+        response.setStatus(HttpServletResponse.SC_BAD_GATEWAY);
+        assertEquals(HttpServletResponse.SC_BAD_GATEWAY, response.getStatus());
+
+        response.reset();
+        assertEquals(HttpServletResponse.SC_OK, response.getStatus());
+    }
+
+    @Test
+    public void testWriteStringContent() throws Exception {
+        final String TEST_CONTENT = "Der Jodelkaiser äöü߀ ᚠᛇᚻ";
+        response.setCharacterEncoding(CharEncoding.UTF_8);
+        response.getWriter().write(TEST_CONTENT);
+        assertEquals(TEST_CONTENT, response.getOutputAsString());
+
+        response.resetBuffer();
+        assertEquals(0, response.getOutputAsString().length());
+    }
+
+    @Test
+    public void testWriteBinaryContent() throws Exception {
+        final byte[] TEST_DATA = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 };
+        response.getOutputStream().write(TEST_DATA);
+        assertArrayEquals(TEST_DATA, response.getOutput());
+
+        response.resetBuffer();
+        assertEquals(0, response.getOutput().length);
+    }
+
+    @Test
+    public void testIsCommitted() throws Exception {
+        assertFalse(response.isCommitted());
+        response.flushBuffer();
+        assertTrue(response.isCommitted());
+    }
+
+    @Test
+    public void testCookies() {
+        assertNull(response.getCookies());
+
+        response.addCookie(new Cookie("cookie1", "value1"));
+        response.addCookie(new Cookie("cookie2", "value2"));
+
+        assertEquals("value1", response.getCookie("cookie1").getValue());
+
+        Cookie[] cookies = response.getCookies();
+        assertEquals(2, cookies.length);
+        assertEquals("value1", cookies[0].getValue());
+        assertEquals("value2", cookies[1].getValue());
+
+        response.reset();
+        assertNull(response.getCookies());
+    }
+
+}

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletResponseTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletResponseTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Oct 13 11:54:39 2014
@@ -0,0 +1 @@
+LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author

Propchange: sling/trunk/testing/sling-mock/src/test/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletResponseTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/content.json
URL: http://svn.apache.org/viewvc/sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/content.json?rev=1631356&view=auto
==============================================================================
--- sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/content.json (added)
+++ sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/content.json Mon Oct 13 11:54:39 2014
@@ -0,0 +1,257 @@
+{
+  "jcr:primaryType": "app:Page",
+  "jcr:createdBy": "admin",
+  "jcr:created": "Thu Aug 07 2014 16:32:59 GMT+0200",
+  "jcr:content": {
+    "jcr:primaryType": "app:PageContent",
+    "jcr:createdBy": "admin",
+    "jcr:title": "English",
+    "app:template": "/apps/sample/templates/homepage",
+    "jcr:created": "Thu Aug 07 2014 16:32:59 GMT+0200",
+    "app:lastModified": "Tue Apr 22 2014 15:11:24 GMT+0200",
+    "dateISO8601String": "2014-04-22T15:11:24.000+02:00",
+    "pageTitle": "Sample Homepage",
+    "sling:resourceType": "sample/components/homepage",
+    "app:designPath": "/etc/designs/sample",
+    "app:lastModifiedBy": "admin",
+    "par": {
+      "jcr:primaryType": "nt:unstructured",
+      "sling:resourceType": "foundation/components/parsys",
+      "colctrl": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:createdBy": "admin",
+        "jcr:lastModifiedBy": "admin",
+        "layout": "2;colctrl-lt0",
+        "jcr:created": "Mon Aug 23 2010 22:02:24 GMT+0200",
+        "jcr:lastModified": "Mon Aug 23 2010 22:02:35 GMT+0200",
+        "sling:resourceType": "foundation/components/parsys/colctrl"
+      },
+      "image": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:createdBy": "admin",
+        "fileReference": "/content/dam/sample/portraits/jane_doe.jpg",
+        "jcr:lastModifiedBy": "admin",
+        "jcr:created": "Mon Aug 23 2010 22:03:39 GMT+0200",
+        "width": "340",
+        "jcr:lastModified": "Sun Oct 31 2010 21:39:50 GMT+0100",
+        "sling:resourceType": "foundation/components/image",
+        "file": {
+          "jcr:primaryType": "nt:file",
+          "jcr:createdBy": "admin",
+          "jcr:created": "Thu Aug 07 2014 16:32:59 GMT+0200",
+          "jcr:content": {
+            "jcr:primaryType": "nt:resource",
+            "jcr:lastModifiedBy": "anonymous",
+            "jcr:mimeType": "image/jpeg",
+            "jcr:lastModified": "Thu Aug 07 2014 16:32:59 GMT+0200",
+            ":jcr:data": 24377,
+            "jcr:uuid": "eda76d00-b2cd-4b59-878f-c33f71ceaddc"
+          }
+        }
+      },
+      "title_1": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:createdBy": "admin",
+        "jcr:title": "Strategic Consulting",
+        "jcr:lastModifiedBy": "admin",
+        "jcr:created": "Mon Aug 23 2010 22:12:08 GMT+0200",
+        "jcr:lastModified": "Wed Oct 27 2010 21:33:24 GMT+0200",
+        "sling:resourceType": "sample/components/title"
+      },
+      "text_1": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:createdBy": "admin",
+        "jcr:lastModifiedBy": "admin",
+        "jcr:created": "Sun Oct 31 2010 21:48:04 GMT+0100",
+        "text": "<p><span class=\"Apple-style-span\" style=\"font-size: 12px;\">In&nbsp;today's competitive market, organizations can face several key geometric challenges:<\/span><\/p>\n<ul>\n<li><span class=\"Apple-style-span\" style=\"font-size: 12px;\">Polyhedral Sectioning<\/span><\/li>\n<li><span class=\"Apple-style-span\" style=\"font-size: 12px;\">Triangulation&nbsp;<\/span><\/li>\n<li><span class=\"Apple-style-span\" style=\"font-size: 12px;\">Trigonometric Calculation<\/span><\/li>\n<li><span class=\"Apple-style-span\" style=\"font-size: 12px;\">Ruler and Compass Construction<\/span><\/li>\n<\/ul>\n<p><span class=\"Apple-style-span\" style=\"font-size: 12px;\"><br>\nSample is ready to help your organization deal effectively with all these challenges through our award winning geometric consulting services.<\/span><\/p>\n<p style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;\"><\/p>\n",
+        "jcr:lastModified": "Sun Oct 31 2010 21:49:06 GMT+0100",
+        "sling:resourceType": "foundation/components/text",
+        "textIsRich": "true"
+      },
+      "col_break12825937554040": {
+        "jcr:primaryType": "nt:unstructured",
+        "controlType": "break",
+        "sling:resourceType": "foundation/components/parsys/colctrl"
+      },
+      "image_0": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:createdBy": "admin",
+        "fileReference": "/content/dam/sample/offices/clean_room.jpg",
+        "height": "226",
+        "jcr:lastModifiedBy": "admin",
+        "jcr:created": "Mon Aug 23 2010 22:04:46 GMT+0200",
+        "jcr:lastModified": "Fri Nov 05 2010 10:38:15 GMT+0100",
+        "sling:resourceType": "foundation/components/image",
+        "imageRotate": "0",
+        "file": {
+          "jcr:primaryType": "nt:file",
+          "jcr:createdBy": "admin",
+          "jcr:created": "Thu Aug 07 2014 16:32:59 GMT+0200",
+          "jcr:content": {
+            "jcr:primaryType": "nt:resource",
+            "jcr:lastModifiedBy": "anonymous",
+            "jcr:mimeType": "image/jpeg",
+            "jcr:lastModified": "Thu Aug 07 2014 16:32:59 GMT+0200",
+            ":jcr:data": 21142,
+            "jcr:uuid": "6139077f-191f-4337-aaef-55456ebe6784"
+          }
+        }
+      },
+      "title_2": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:createdBy": "admin",
+        "jcr:title": "Shape Technology",
+        "jcr:lastModifiedBy": "admin",
+        "jcr:created": "Mon Aug 23 2010 22:12:13 GMT+0200",
+        "jcr:lastModified": "Tue Oct 26 2010 21:16:29 GMT+0200",
+        "sling:resourceType": "sample/components/title"
+      },
+      "text_0": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:createdBy": "admin",
+        "jcr:lastModifiedBy": "admin",
+        "jcr:created": "Mon Aug 23 2010 22:16:30 GMT+0200",
+        "text": "<p>The Sample investment in R&amp;D has done more than solidify our industry leadership role, we have now outpaced our competitors to such an extent that we are in an altogether new space.<\/p>\n<p>This is why our high quality polygons and polyhedra provide the only turnkey solutions across the whole range of euclidean geometry. And our mathematicians are working on the next generation of fractal curves to bring you shapes that are unthinkable today.<\/p>\n<p><\/p>\n<p><\/p>\n",
+        "jcr:lastModified": "Mon Nov 08 2010 20:39:00 GMT+0100",
+        "sling:resourceType": "foundation/components/text",
+        "textIsRich": "true"
+      },
+      "col_end12825937444810": {
+        "jcr:primaryType": "nt:unstructured",
+        "controlType": "end",
+        "sling:resourceType": "foundation/components/parsys/colctrl"
+      }
+    },
+    "header": {
+      "jcr:primaryType": "nt:unstructured",
+      "jcr:title": "trust our experience\r\nto manage your business",
+      "imageReference": "/content/dam/sample/header.png",
+      "text": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc eget neque. Nunc condimentum ipsum et orci. Aenean est. Cras eget diam. read more",
+      "sling:resourceType": "sample/components/header"
+    },
+    "newslist": {
+      "jcr:primaryType": "nt:unstructured",
+      "headline": "trust our experience\nto manage your business",
+      "text": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc eget neque. Nunc condimentum ipsum et orci. Aenean est. Cras eget diam. read more",
+      "sling:resourceType": "sample/components/listchildren",
+      "listroot": "/content/sample/en/about/news"
+    },
+    "lead": {
+      "jcr:primaryType": "nt:unstructured",
+      "jcr:title": "World Leader in Applied Geometry ",
+      "jcr:lastModifiedBy": "admin",
+      "text": "Lead Text",
+      "title": "Lead Title",
+      "jcr:description": "Sample has been selling and servicing shapes for over 2000 years. From our beginnings as a small vendor of squares and rectangles we have grown our business into a leading global provider of platonic solids and fractals. Join us as we lead geometry into the future.",
+      "jcr:lastModified": "Wed Jan 19 2011 14:35:29 GMT+0100",
+      "sling:resourceType": "sample/components/lead",
+      "app:annotations": {"jcr:primaryType": "nt:unstructured"}
+    },
+    "image": {
+      "jcr:primaryType": "nt:unstructured",
+      "jcr:lastModifiedBy": "admin",
+      "jcr:lastModified": "Wed Oct 27 2010 21:30:59 GMT+0200",
+      "imageRotate": "0"
+    },
+    "carousel": {
+      "jcr:primaryType": "nt:unstructured",
+      "playSpeed": "6000",
+      "jcr:lastModifiedBy": "admin",
+      "pages": [
+        "/content/sample/en/events/techsummit",
+        "/content/sample/en/events/userconf",
+        "/content/sample/en/events/shapecon",
+        "/content/sample/en/events/dsc"
+      ],
+      "jcr:lastModified": "Tue Oct 05 2010 14:14:27 GMT+0200",
+      "transTime": "1000",
+      "sling:resourceType": "foundation/components/carousel",
+      "listFrom": "static"
+    },
+    "rightpar": {
+      "jcr:primaryType": "nt:unstructured",
+      "sling:resourceType": "foundation/components/parsys",
+      "teaser": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:createdBy": "admin",
+        "jcr:lastModifiedBy": "admin",
+        "jcr:created": "Tue Jan 25 2011 11:30:09 GMT+0100",
+        "campaignpath": "/content/campaigns/sample",
+        "jcr:lastModified": "Wed Feb 02 2011 08:40:30 GMT+0100",
+        "sling:resourceType": "personalization/components/teaser"
+      }
+    }
+  },
+  "toolbar": {
+    "jcr:primaryType": "app:Page",
+    "jcr:createdBy": "admin",
+    "jcr:created": "Thu Aug 07 2014 16:33:00 GMT+0200",
+    "jcr:content": {
+      "jcr:primaryType": "app:PageContent",
+      "subtitle": "Contains the toolbar",
+      "jcr:createdBy": "admin",
+      "jcr:title": "Toolbar",
+      "app:template": "/apps/sample/templates/contentpage",
+      "jcr:created": "Thu Aug 07 2014 16:33:00 GMT+0200",
+      "app:lastModified": "Wed Aug 25 2010 22:51:02 GMT+0200",
+      "hideInNav": "true",
+      "sling:resourceType": "sample/components/contentpage",
+      "app:lastModifiedBy": "admin",
+      "par": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType": "foundation/components/parsys"
+      },
+      "rightpar": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType": "foundation/components/iparsys",
+        "iparsys_fake_par": {
+          "jcr:primaryType": "nt:unstructured",
+          "sling:resourceType": "foundation/components/iparsys/par"
+        }
+      }
+    },
+    "profiles": {
+      "jcr:primaryType": "app:Page",
+      "jcr:createdBy": "admin",
+      "jcr:created": "Thu Aug 07 2014 16:33:00 GMT+0200",
+      "jcr:content": {
+        "jcr:primaryType": "app:PageContent",
+        "jcr:createdBy": "admin",
+        "jcr:title": "Profiles",
+        "app:template": "/apps/sample/templates/contentpage",
+        "jcr:created": "Thu Aug 07 2014 16:33:00 GMT+0200",
+        "app:lastModified": "Thu Nov 05 2009 20:27:13 GMT+0100",
+        "hideInNav": true,
+        "sling:resourceType": "sample/components/contentpage",
+        "app:lastModifiedBy": "admin",
+        "longProp": 1234567890123,
+        "decimalProp": 1.2345,
+        "booleanProp": true,
+        "longPropMulti": [1234567890123,55],
+        "decimalPropMulti": [1.2345,1.1],
+        "booleanPropMulti": [true,false],
+        "par": {
+          "jcr:primaryType": "nt:unstructured",
+          "sling:resourceType": "foundation/components/parsys",
+          "textimage": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "foundation/components/textimage"
+          },
+          "mygadgets": {
+            "jcr:primaryType": "nt:unstructured",
+            "gadgets": "http://customer.meteogroup.de/meteogroup/gadgets/wetter24.xml\nhttp://germanweatherradar.googlecode.com/svn/trunk/german-weather-radar.xml\nhttp://www.digitalpowered.info/gadget/ski.pictures.xml\nhttp://www.canbuffi.de/gadgets/clock/clock.xml",
+            "sling:resourceType": "personalization/components/mygadgets"
+          }
+        },
+        "rightpar": {
+          "jcr:primaryType": "nt:unstructured",
+          "sling:resourceType": "foundation/components/iparsys",
+          "iparsys_fake_par": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "foundation/components/iparsys/par"
+          }
+        }
+      }
+    }
+  }
+}

Propchange: sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/content.json
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/content.json
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Oct 13 11:54:39 2014
@@ -0,0 +1 @@
+LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author

Propchange: sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/content.json
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/dam.json
URL: http://svn.apache.org/viewvc/sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/dam.json?rev=1631356&view=auto
==============================================================================
--- sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/dam.json (added)
+++ sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/dam.json Mon Oct 13 11:54:39 2014
@@ -0,0 +1,156 @@
+{
+  "jcr:primaryType": "sling:OrderedFolder",
+  "jcr:createdBy": "admin",
+  "jcr:title": "Sample",
+  "jcr:created": "Thu Aug 07 2014 16:32:56 GMT+0200",
+  "portraits": {
+    "jcr:primaryType": "sling:OrderedFolder",
+    "jcr:createdBy": "admin",
+    "jcr:title": "Portraits",
+    "jcr:created": "Thu Aug 07 2014 16:32:57 GMT+0200",
+    "scott_reynolds.jpg": {
+      "jcr:primaryType": "dam:Asset",
+      "jcr:mixinTypes": ["mix:versionable"],
+      "jcr:createdBy": "admin",
+      "jcr:versionHistory": "d56a56fa-2a34-487d-b349-53b51033ffc4",
+      "jcr:predecessors": ["f08611ae-e7ed-4b85-99fa-2c4a623e49c2"],
+      "jcr:created": "Thu Aug 07 2014 16:32:58 GMT+0200",
+      "jcr:baseVersion": "f08611ae-e7ed-4b85-99fa-2c4a623e49c2",
+      "jcr:isCheckedOut": true,
+      "jcr:uuid": "442d55b6-d534-4faf-9394-c9c20d095985",
+      "jcr:content": {
+        "jcr:primaryType": "dam:AssetContent",
+        "jcr:lastModifiedBy": "admin",
+        "app:name": "scott_reynolds.jpg",
+        "jcr:lastModified": "Wed May 08 2013 10:21:57 GMT+0200",
+        "app:parentPath": "/content/dam/sample/portraits",
+        "renditions": {
+          "jcr:primaryType": "nt:folder",
+          "jcr:createdBy": "admin",
+          "jcr:created": "Thu Aug 07 2014 16:32:58 GMT+0200",
+          "dam.thumbnail.48.48.png": {
+            "jcr:primaryType": "nt:file",
+            "jcr:createdBy": "admin",
+            "jcr:created": "Thu Aug 07 2014 16:32:58 GMT+0200",
+            "jcr:content": {
+              "jcr:primaryType": "nt:resource",
+              "jcr:lastModifiedBy": "admin",
+              "jcr:mimeType": "image/png",
+              "jcr:lastModified": "Thu Aug 07 2014 16:32:58 GMT+0200",
+              ":jcr:data": 5071,
+              "jcr:uuid": "1a8cda3f-ac06-4779-89e2-55e3929cfc3e"
+            }
+          },
+          "dam.thumbnail.140.100.png": {
+            "jcr:primaryType": "nt:file",
+            "jcr:createdBy": "admin",
+            "jcr:created": "Thu Aug 07 2014 16:32:58 GMT+0200",
+            "jcr:content": {
+              "jcr:primaryType": "nt:resource",
+              "jcr:lastModifiedBy": "admin",
+              "jcr:mimeType": "image/png",
+              "jcr:lastModified": "Thu Aug 07 2014 16:32:58 GMT+0200",
+              ":jcr:data": 34023,
+              "jcr:uuid": "5cbcbf47-a33e-4f33-b9d9-55c9d5f7dd85"
+            }
+          },
+          "original": {
+            "jcr:primaryType": "nt:file",
+            "jcr:createdBy": "admin",
+            "jcr:created": "Thu Aug 07 2014 16:32:58 GMT+0200",
+            "jcr:content": {
+              "jcr:primaryType": "nt:resource",
+              "jcr:lastModifiedBy": "admin",
+              "jcr:mimeType": "image/jpeg",
+              "jcr:lastModified": "Thu Aug 07 2014 16:32:58 GMT+0200",
+              ":jcr:data": 46825,
+              "jcr:uuid": "5673bb2d-0fc3-485d-9767-57241c1b4a30"
+            }
+          },
+          "dam.thumbnail.319.319.png": {
+            "jcr:primaryType": "nt:file",
+            "jcr:createdBy": "admin",
+            "jcr:created": "Thu Aug 07 2014 16:32:58 GMT+0200",
+            "jcr:content": {
+              "jcr:primaryType": "nt:resource",
+              "jcr:lastModifiedBy": "admin",
+              "jcr:mimeType": "image/png",
+              "jcr:lastModified": "Thu Aug 07 2014 16:32:58 GMT+0200",
+              ":jcr:data": 162594,
+              "jcr:uuid": "176a4ba8-c03b-4f90-815e-d84070d15dc2"
+            }
+          }
+        },
+        "metadata": {
+          "jcr:primaryType": "nt:unstructured",
+          "jcr:mixinTypes": ["app:Taggable"],
+          "dam:UserComment": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\
 u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
+          "dam:ExposureCompensation": 2,
+          "tiff:Compression": 6,
+          "tiff:Make": "Canon\u0000",
+          "dam:Physicalwidthininches": 4.483333110809326,
+          "exif:CustomRendered": 0,
+          "dam:JpgFromRawStart": 1054,
+          "dam:Fileformat": "JPEG",
+          "exif:MaxApertureValue": 4.64385986328125,
+          "dam:Progressive": "no",
+          "exif:FNumber": 5,
+          "tiff:ImageLength": 595,
+          "exif:FlashpixVersion": "0100",
+          "tiff:YResolution": 180,
+          "dam:OtherImageStart": 1054,
+          "exif:FocalLength": 39,
+          "exif:ColorSpace": 65535,
+          "jcr:lastModifiedBy": "admin",
+          "xmp:CreatorTool": "Adobe Photoshop 7.0",
+          "dam:SensingMethod": 2,
+          "dam:extracted": "Wed Oct 06 2010 15:53:22 GMT+0200",
+          "dam:ApertureValue": 4.64385986328125,
+          "dc:format": "image/jpeg",
+          "dam:Bitsperpixel": 24,
+          "exif:FileSource": 3,
+          "dam:OtherImageLength": 2788,
+          "exif:ExifVersion": "0221",
+          "tiff:YCbCrPositioning": 1,
+          "dam:MIMEtype": "image/jpeg",
+          "tiff:Orientation": 1,
+          "dam:FocalPlaneXResolution": 3443.946188340807,
+          "dam:JpgFromRawLength": 2788,
+          "dam:Physicalwidthindpi": 180,
+          "dam:Physicalheightindpi": 180,
+          "exif:Flash": 0,
+          "exif:CompressedBitsPerPixel": 3,
+          "tiff:ResolutionUnit": 2,
+          "dam:ShutterSpeedValue": 5.906890869140625,
+          "exif:ComponentsConfiguration": ["[B@d19c55"],
+          "dam:FocalPlaneResolutionUnit": 2,
+          "dc:modified": "Wed Oct 06 2010 15:53:23 GMT+0200",
+          "dam:Numberofimages": 1,
+          "exif:ExposureMode": 0,
+          "exif:ExposureTime": 0.016666666666666666,
+          "tiff:XResolution": 180,
+          "dam:ExifOffset": 220,
+          "dam:PreviewImageStart": 1054,
+          "exif:WhiteBalance": 0,
+          "app:tags": [
+            "stockphotography:business/business_people",
+            "properties:style/color",
+            "properties:orientation/landscape"
+          ],
+          "jcr:lastModified": "Wed May 08 2013 10:21:57 GMT+0200",
+          "dam:Numberoftextualcomments": 0,
+          "xmp:ModifyDate": "Sat Oct 01 2005 15:16:30 GMT+0200",
+          "tiff:ImageWidth": 807,
+          "exif:DateTimeOriginal": "Sat Oct 01 2005 15:16:30 GMT+0200",
+          "dam:ModifyDate": "Thu Oct 20 2005 12:56:51 GMT+0200",
+          "tiff:Model": "Canon EOS 300D DIGITAL\u0000",
+          "exif:MeteringMode": 5,
+          "exif:SceneCaptureType": 0,
+          "dc:title": "Scott Reynolds",
+          "dam:PreviewImageLength": 2788,
+          "dam:FocalPlaneYResolution": 3442.016806722689
+        }
+      }
+    }
+  }
+}

Propchange: sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/dam.json
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/dam.json
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Oct 13 11:54:39 2014
@@ -0,0 +1 @@
+LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author

Propchange: sling/trunk/testing/sling-mock/src/test/resources/json-import-samples/dam.json
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/trunk/testing/sling-mock/src/test/resources/sample-image.gif
URL: http://svn.apache.org/viewvc/sling/trunk/testing/sling-mock/src/test/resources/sample-image.gif?rev=1631356&view=auto
==============================================================================
Binary file - no diff available.

Propchange: sling/trunk/testing/sling-mock/src/test/resources/sample-image.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Propchange: sling/trunk/testing/sling-mock/src/test/resources/sample-image.gif
------------------------------------------------------------------------------
    svn:needs-lock = *