private void simplePost()

in src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostStatusTest.java [56:77]


    private void simplePost(String url, String statusParam, int expectStatus, String expectLocation)
            throws IOException {

        final PostMethod post = new PostMethod(url);
        post.setFollowRedirects(false);

        if (statusParam != null) {
            post.addParameter(SlingPostConstants.RP_STATUS, statusParam);
        }

        final int status = httpClient.executeMethod(post);
        assertEquals("Unexpected status response", expectStatus, status);

        if (expectLocation != null) {
            String location = post.getResponseHeader("Location").getValue();

            assertNotNull("Expected location header", location);
            assertTrue(location.endsWith(expectLocation));
        }

        post.releaseConnection();
    }