private void setupRewrite() throws IOException {
        String pluginResult = initPlugin(PluginEnum.CONTEXT_PATH.getName(), "");
        assertThat(pluginResult, CoreMatchers.is("success"));
        LocalPluginController.RuleLocalData ruleLocalData = new LocalPluginController.RuleLocalData();
        ruleLocalData.setRuleHandler("{\"contextPath\":\"/dubbo\", \"addPrefix\":\"\", \"rewriteContextPath\":\"/http\", \"percentage\":100}");
        ConditionData conditionData = new ConditionData();
        conditionData.setParamType(ParamTypeEnum.URI.getName());
        conditionData.setOperator(OperatorEnum.EQ.getAlias());
        conditionData.setParamValue("/dubbo/findById");
        ruleLocalData.setConditionDataList(Collections.singletonList(conditionData));
        String message = initSelectorAndRules(PluginEnum.CONTEXT_PATH.getName(), "", 0,
                buildSelectorConditionList("/dubbo/findById"), Collections.singletonList(ruleLocalData));
        assertThat(message, is("success"));
        
        pluginResult = initPlugin(PluginEnum.REWRITE.getName(), "");
        assertThat(pluginResult, is("success"));
        String selectorAndRulesResult = initSelectorAndRules(PluginEnum.REWRITE.getName(), "", 0,
                buildSelectorConditionList("/http/findById"), buildRewriteRuleLocalDataList());
        assertThat(selectorAndRulesResult, is("success"));
    }
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