new String(httpResponse.getByteArrayOutputStream().toByteArray()));
}
public void testInvokeWithAxisHttpResponseImpl() throws Exception {
RequestLine line = new BasicRequestLine("", "", new ProtocolVersion("http", 1, 0));
MockHTTPResponse httpResponse = new MockAxisHttpResponse(line);
SOAPEnvelope envelope = getEnvelope();
httpResponse = (MockAxisHttpResponse) configAndRun(httpResponse,
(OutTransportInfo) httpResponse, null, getTransportSender());
assertEquals("Not the expected Header value", "application/xml", httpResponse.getHeaders()
.get("Content-Type"));
assertEquals("Not the expected Header value", "custom-value", httpResponse.getHeaders()
.get("Custom-header"));
assertEquals("Not the expected body content", envelope.toString().replace("utf", "UTF"),
new String(httpResponse.getByteArrayOutputStream().toByteArray()));
}