src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletImportTest.java [232:257]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        final String testPath = TEST_BASE_PATH;
        Map<String, String> props = new HashMap<String, String>();
        String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props);
        urlsToDelete.add(testNode);

        props.clear();
        props.put(SlingPostConstants.RP_OPERATION,
        		SlingPostConstants.OPERATION_IMPORT);

        String testNodeName = "testNode_" + String.valueOf(random.nextInt());
        props.put(SlingPostConstants.RP_NODE_NAME_HINT, testNodeName);
        testFile = getTestFile(getClass().getResourceAsStream("/integration-test/servlets/post/testimport3.json"));
        props.put(SlingPostConstants.RP_CONTENT_TYPE, "json");
        props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*");
        props.put(SlingPostConstants.RP_CHECKIN, "true");
        String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath, new NameValuePairList(props), null, true,
        		testFile, SlingPostConstants.RP_CONTENT_FILE, null);

        // assert content at new location
        String content = getContent(importedNodeUrl + ".json", CONTENT_TYPE_JSON);

		JsonObject jsonObj = JsonUtil.parseObject(content);
		assertNotNull(jsonObj);

		//assert that the versionable node is checked in.
		assertFalse(jsonObj.getBoolean("jcr:isCheckedOut"));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletImportTest.java [289:315]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        final String testPath = TEST_BASE_PATH;
        Map<String, String> props = new HashMap<String, String>();
        String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props);
        urlsToDelete.add(testNode);

        //1. first create some content to update.
        props.clear();
        props.put(SlingPostConstants.RP_OPERATION,
        		SlingPostConstants.OPERATION_IMPORT);

        String testNodeName = "testNode_" + String.valueOf(random.nextInt());
        props.put(SlingPostConstants.RP_NODE_NAME_HINT, testNodeName);
        testFile = getTestFile(getClass().getResourceAsStream("/integration-test/servlets/post/testimport3.json"));
        props.put(SlingPostConstants.RP_CONTENT_TYPE, "json");
        props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*");
        props.put(SlingPostConstants.RP_CHECKIN, "true");
        String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath, new NameValuePairList(props), null, true,
        		testFile, SlingPostConstants.RP_CONTENT_FILE, null);

        // assert content at new location
        String content = getContent(importedNodeUrl + ".json", CONTENT_TYPE_JSON);

		JsonObject jsonObj = JsonUtil.parseObject(content);
		assertNotNull(jsonObj);

		//assert that the versionable node is checked in.
		assertFalse(jsonObj.getBoolean("jcr:isCheckedOut"));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



