Skip to content

Commit fc7e65c

Browse files
committed
SYNAPSE-1109: fix for unit test
1 parent 533588b commit fc7e65c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

modules/core/src/test/java/org/apache/synapse/util/MessageHelperTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import javax.activation.DataHandler;
2323

2424
import junit.framework.TestCase;
25+
import org.apache.axis2.addressing.EndpointReference;
2526
import org.apache.axis2.context.MessageContext;
2627

2728
/**
@@ -37,7 +38,7 @@ public void testClonePartially() throws Exception {
3738
Object result = newMc.getProperty(key);
3839
assertEquals(result, "propValue");
3940
}
40-
41+
4142
// Regression test for SYNAPSE-309
4243
public void testClonePartiallyWithAttachments() throws Exception {
4344
MessageContext origMc = new MessageContext();
@@ -52,10 +53,10 @@ public void testClonePartiallyWithAttachments() throws Exception {
5253
public void testClonePartiallyWithFrom() throws Exception {
5354
String fromValue = "uri://some-from-value";
5455
MessageContext origMc = new MessageContext();
55-
origMc.setFrom(fromValue);
56+
origMc.setFrom(new EndpointReference(fromValue));
5657
MessageContext newMc = MessageHelper.clonePartially(origMc);
57-
Object result = newMc.getFrom();
58-
assertEquals(fromValue, result);
58+
EndpointReference result = newMc.getFrom();
59+
assertEquals(fromValue, result.getAddress());
5960
}
6061

6162
}

0 commit comments

Comments
 (0)