@Test
public void testIssueGetFeature_POST() throws IOException, ParserConfigurationException,
        SAXException {

    final InputStream responseContent = TestData.openStream(this, GEOS_ARCHSITES.DATA);
    final TestHttpResponse httpResponse;
    final String defaultWfs11OutputFormat = "text/xml; subtype=gml/3.1.1";
    httpResponse = new TestHttpResponse(defaultWfs11OutputFormat, "UTF-16", responseContent);
    TestHttpProtocol mockHttp = new TestHttpProtocol(httpResponse);
    createTestProtocol(GEOS_ARCHSITES.CAPABILITIES, mockHttp, new GeoServerStrategy());
    Query query = new Query(GEOS_ARCHSITES.FEATURETYPENAME);
    GetFeature getFeature = new GetFeatureQueryAdapter(query, defaultWfs11OutputFormat,
            "EPSG:4326", ResultType.RESULTS);
    WFSResponse response;
    response = wfs.issueGetFeaturePOST(getFeature);
    assertNotNull(response);
    assertEquals(defaultWfs11OutputFormat, response.getContentType());
    assertNotNull(response.getInputStream());
    assertEquals(Charset.forName("UTF-16"), response.getCharacterEncoding());
    assertEquals("text/xml", mockHttp.postCallbackContentType);
    Document dom;
    String issuedRequest;
    {
        ByteArrayOutputStream out = mockHttp.postCallbackEncodedRequestBody;
        issuedRequest = out.toString();
        System.out.println("Issued request: " + issuedRequest);
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware(true);
        DocumentBuilder docBuilder = dbf.newDocumentBuilder();
        dom = docBuilder.parse(new ByteArrayInputStream(out.toByteArray()));
    }
    
    //was the featuretype declaration included?
    String expectedNsDecl = "xmlns:sf=\"" + GEOS_ARCHSITES.TYPENAME.getNamespaceURI() + "\"";
    assertTrue(issuedRequest, issuedRequest.contains(expectedNsDecl));
    Element root = dom.getDocumentElement();
    assertEquals(WFS.GetFeature.getLocalPart(), root.getLocalName());
    assertEquals(WFS.NAMESPACE, root.getNamespaceURI());
}