action3.setFragmentIndex(URIFragments.PORT);
RewriteRule rule2 = new RewriteRule();
rule2.addRewriteAction(action2);
rule2.addRewriteAction(action3);
MatchEvaluator eval2 = new MatchEvaluator();
URLTextRetriever txtRtvr2 = new URLTextRetriever();
txtRtvr2.setSource(EvaluatorConstants.URI_FRAGMENTS.path.name());
eval2.setTextRetriever(txtRtvr2);
eval2.setRegex(Pattern.compile(".*/MyService"));
rule2.setCondition(eval2);
mediator.addRule(rule2);
MessageContext msgCtx = TestUtils.createLightweightSynapseMessageContext("<empty/>");
msgCtx.setTo(new EndpointReference("http://myhost:8280/MyService"));