File tree Expand file tree Collapse file tree
modules/core/src/test/java/org/apache/synapse/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222import javax .activation .DataHandler ;
2323
2424import junit .framework .TestCase ;
25+ import org .apache .axis2 .addressing .EndpointReference ;
2526import 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}
You can’t perform that action at this time.
0 commit comments