Author: midon
Date: Wed Nov 26 16:18:47 2008
New Revision: 721045
URL: http://svn.apache.org/viewvc?rev=721045&view=rev
Log:
update test class
Modified:
ode/trunk/axis2/src/test/java/org/apache/ode/axis2/httpbinding/HttpMethodConverterTest.java
Modified:
ode/trunk/axis2/src/test/java/org/apache/ode/axis2/httpbinding/HttpMethodConverterTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2/src/test/java/org/apache/ode/axis2/httpbinding/HttpMethodConverterTest.java?rev=721045&r1=721044&r2=721045&view=diff
==============================================================================
---
ode/trunk/axis2/src/test/java/org/apache/ode/axis2/httpbinding/HttpMethodConverterTest.java
(original)
+++
ode/trunk/axis2/src/test/java/org/apache/ode/axis2/httpbinding/HttpMethodConverterTest.java
Wed Nov 26 16:18:47 2008
@@ -24,6 +24,7 @@
import org.apache.commons.httpclient.params.DefaultHttpParams;
import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.apache.ode.il.epr.MutableEndpoint;
import org.apache.ode.bpel.iapi.*;
import org.apache.ode.utils.DOMUtils;
@@ -45,6 +46,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.Collections;
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Alexis Midon</a>
@@ -149,8 +151,7 @@
assertTrue("POST".equalsIgnoreCase(httpMethod.getName()));
assertEquals("Generated URI does not match", expectedUri,
httpMethod.getURI().toString());
- byte[] content = ((ByteArrayRequestEntity) ((PostMethod)
httpMethod).getRequestEntity()).getContent();
- String b = new String(content);
+ String b = ((StringRequestEntity) ((PostMethod)
httpMethod).getRequestEntity()).getContent();
assertEquals("Invalid body in generated http query",
DOMUtils.domToString(helloEl), b);
}
@@ -205,7 +206,7 @@
}
public Map<String, Node> getHeaderParts() {
- return null;
+ return Collections.EMPTY_MAP;
}
public Element getPart(String partName) {