in src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletCopyTest.java [172:193]
public void testCopyNodeDeepRelative() throws IOException {
final String testPath = TEST_BASE_PATH + "/new/"
+ System.currentTimeMillis();
Map<String, String> props = new HashMap<String, String>();
props.put("text", "Hello");
testClient.createNode(HTTP_BASE_URL + testPath + "/src", props);
props.clear();
props.put(SlingPostConstants.RP_OPERATION,
SlingPostConstants.OPERATION_COPY);
props.put(SlingPostConstants.RP_DEST, "deep/new");
try {
testClient.createNode(HTTP_BASE_URL + testPath + "/src", props);
fail("Moving node to non existing parent location should fail.");
} catch (HttpStatusCodeException hsce) {
// actually the status is not 200, but we get "browser" clear stati
if (hsce.getActualStatus() != 200) {
throw hsce;
}
}
}