private static List<LocalPluginController.RuleLocalData> buildRewriteRuleLocalDataList() {
        final LocalPluginController.RuleLocalData ruleLocalData = new LocalPluginController.RuleLocalData();
        
        ConditionData conditionData = new ConditionData();
        conditionData.setParamType(ParamTypeEnum.URI.getName());
        conditionData.setOperator(OperatorEnum.EQ.getAlias());
        conditionData.setParamName("/");
        conditionData.setParamValue("/http/findById");
        ruleLocalData.setConditionDataList(Collections.singletonList(conditionData));
        ruleLocalData.setRuleName("rewriteMetaData");
        
        RewriteHandle rewriteHandle = new RewriteHandle();
        rewriteHandle.setRegex("/http/findById");
        rewriteHandle.setReplace("/order/findById");
        rewriteHandle.setRewriteMetaData(true);
        rewriteHandle.setPercentage(100);
        
        ruleLocalData.setRuleHandler(JsonUtils.toJson(rewriteHandle));
        return Collections.singletonList(ruleLocalData);
    }
The integrated test for combination plugins about contextPath and rewrite.
shenyu-integrated-test/shenyu-integrated-test-rewrite/src/test/java/org/apache/shenyu/integrated/test/rewrite/ContextPathAndRewritePluginTest.java