public static void verifierUri(final String handle) throws JsonProcessingException {
        SpringCloudSelectorHandle springCloudSelectorHandle = MAPPER.readValue(handle, SpringCloudSelectorHandle.class);
        Assertions.assertEquals("springCloud-test", springCloudSelectorHandle.getServiceId());
        Assertions.assertEquals(false, springCloudSelectorHandle.getGray());
        if (ObjectUtils.isEmpty(springCloudSelectorHandle.getDivideUpstreams())) {
            return;
        }
        DivideUpstream divideUpstream = springCloudSelectorHandle.getDivideUpstreams().get(0);
        Assertions.assertEquals(50, divideUpstream.getWeight());
        Assertions.assertEquals(600000, divideUpstream.getWarmup());
        Assertions.assertEquals("http://", divideUpstream.getProtocol());
        Assertions.assertEquals(true, divideUpstream.isStatus());
    }
"))
                                                .build(),
                                        newRuleBuilder("rule")
                                                .handle(SpringCloudRuleHandle.builder().loadBalance("hash").timeout(3000).build())
                                                .conditionList(newConditions(Condition.ParamType.URI, Condition.Operator.PATH_PATTERN, TEST + "/**"))
                                                .build()
                                )
                                .checker(notExists(TEST + "/xx"))
                                .waiting(exists(TEST + "/xx"))
                                .build()
                )
                .caseSpec(
                        ShenYuCaseSpec.builder()
                                .addExists(TEST + "/xx")
                                .addExists(TEST + "/yy")
                                .addNotExists("/springcloud/te")
                                .addNotExists("/springcloud/td")
                                .addExists(Method.POST, TEST + "/xx")
                                .addExists(Method.PUT, TEST + "/xx")
                                .addExists(Method.DELETE, TEST + "/xx")
                                .build()
                )
                .afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(TEST + "/xx")).build())
                .build();
    }

    private ShenYuScenarioSpec testWithUriStartWith() {
        return ShenYuScenarioSpec.builder()
                .name("single-spring-cloud uri starts_with]")
                .beforeEachSpec(
                        ShenYuBeforeEachSpec.builder()
                                .addSelectorAndRule(
                                        newSelectorBuilder("selector", Plugin.SPRING_CLOUD)
                                                .handle(SpringCloudSelectorHandle.builder().serviceId("springCloud-test")
                                                        .gray(true)
                                                        .divideUpstreams(DIVIDE_UPSTREAMS)
                                                        .build())
                                                .conditionList(newConditions(Condition.ParamType.URI, Condition.Operator.STARTS_WITH, TEST))
                                                .build(),
                                        newRuleBuilder("rule")
                                                .handle(SpringCloudRuleHandle.builder().loadBalance("hash").timeout(3000).build())
                                                .conditionList(newConditions(Condition.ParamType.URI, Condition.Operator.STARTS_WITH, TEST))
                                                .build()
                                )
                                .checker(notExists(TEST))
                                .waiting(exists(TEST))
                                .build()
                )
                .caseSpec(
                        ShenYuCaseSpec.builder()
                                .addExists(TEST + "/xx")
                                .addNotExists("/springcloud/testt")
                                .addNotExists("/springcloud/tes")
                                .addExists(Method.POST, TEST + "/xx")
                                .addExists(Method.PUT, TEST + "/xx")
                                .addExists(Method.DELETE, TEST + "/xx")
                                .build()
                )
                .afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(TEST)).build())
                .build();
    }

    private ShenYuScenarioSpec testWithEndWith() {
        return ShenYuScenarioSpec.builder()
                .name("single-spring-cloud uri ends_with]")
                .beforeEachSpec(
                        ShenYuBeforeEachSpec.builder()
                                .addSelectorAndRule(
                                        newSelectorBuilder("selector", Plugin.SPRING_CLOUD)
                                                .handle(SpringCloudSelectorHandle.builder().serviceId("springCloud-test")
                                                        .gray(true)
                                                        .divideUpstreams(DIVIDE_UPSTREAMS)
                                                        .build())
                                                .conditionList(newConditions(Condition.ParamType.URI, Condition.Operator.ENDS_WITH, "/test"))
                                                .build(),
                                        newRuleBuilder("rule")
                                                .handle(SpringCloudRuleHandle.builder().loadBalance("hash").timeout(3000).build())
                                                .conditionList(newConditions(Condition.ParamType.URI, Condition.Operator.ENDS_WITH, "/test"))
                                                .build()
                                )
                                .checker(notExists(TEST))
                                .waiting(exists(TEST))
                                .build()
                )
                .caseSpec(
                        ShenYuCaseSpec.builder()
                                .addExists(TEST)
                                .addNotExists("/springcloud")
                                .addNotExists("/springcloud/tested")
                                .build()
                )
                .afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(TEST)).build())
                .build();
    }

    private ShenYuScenarioSpec testWithMethodGet() {
        return ShenYuScenarioSpec.builder()
                .name("single-spring-cloud method GET")
                .beforeEachSpec(
                        ShenYuBeforeEachSpec.builder()
                                .addSelectorAndRule(
                                        newSelectorBuilder("selector", Plugin.SPRING_CLOUD)
                                                .handle(SpringCloudSelectorHandle.builder().serviceId("springCloud-test")
                                                        .gray(true)
                                                        .divideUpstreams(DIVIDE_UPSTREAMS)
                                                        .build())
                                                .conditionList(Lists.newArrayList(
                                                        newCondition(Condition.ParamType.METHOD, Condition.Operator.EQUAL, "GET"),
                                                        newCondition(Condition.ParamType.URI, Condition.Operator.EQUAL, TEST)
                                                ))
                                                .build(),
                                        newRuleBuilder("rule")
                                                .handle(SpringCloudRuleHandle.builder().loadBalance("hash").timeout(3000).build())
                                                .conditionList(Lists.newArrayList(
                                                        newCondition(Condition.ParamType.METHOD, Condition.Operator.EQUAL, "GET"),
                                                        newCondition(Condition.ParamType.URI, Condition.Operator.EQUAL, TEST)
                                                ))
                                                .build()
                                )
                                .checker(notExists(Method.GET, TEST))
                                .waiting(exists(Method.GET, TEST))
                                .build()
                )
                .caseSpec(
                        ShenYuCaseSpec.builder()
                                .addExists(Method.GET, TEST)
                                .addNotExists(Method.POST, TEST)
                                .addNotExists(Method.PUT, TEST)
                                .addNotExists(Method.DELETE, TEST)
                                .addNotExists(Method.GET, "/springcloud/tes")
                                .addNotExists(Method.GET, "/springcloud/tests")
                                .addNotExists(Method.GET, "/get")
                                .build()
                )
                .afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.GET, TEST)).build())
                .build();
    }

    private ShenYuScenarioSpec testWithMethodPost() {
        return ShenYuScenarioSpec.builder()
                .name("single-spring-cloud method POST")
                .beforeEachSpec(
                        ShenYuBeforeEachSpec.builder()
                                .addSelectorAndRule(
                                        newSelectorBuilder("selector", Plugin.SPRING_CLOUD)
                                                .handle(SpringCloudSelectorHandle.builder().serviceId("springCloud-test")
                                                        .gray(true)
                                                        .divideUpstreams(DIVIDE_UPSTREAMS)
                                                        .build())
                                                .conditionList(Lists.newArrayList(
                                                        newCondition(Condition.ParamType.METHOD, Condition.Operator.EQUAL, "POST"),
                                                        newCondition(Condition.ParamType.URI, Condition.Operator.EQUAL, TEST)
                                                ))
                                                .build(),
                                        newRuleBuilder("rule")
                                                .handle(SpringCloudRuleHandle.builder().loadBalance("hash").timeout(3000).build())
                                                .conditionList(Lists.newArrayList(
                                                        newCondition(Condition.ParamType.METHOD, Condition.Operator.EQUAL, "POST"),
                                                        newCondition(Condition.ParamType.URI, Condition.Operator.EQUAL, TEST)
                                                ))
                                                .build()
                                )
                                .checker(notExists(Method.POST, TEST))
                                .waiting(exists(Method.POST, TEST))
                                .build()
                )
                .caseSpec(
                        ShenYuCaseSpec.builder()
                                .addExists(Method.POST, TEST)
                                .addNotExists(Method.GET, TEST)
                                .addNotExists(Method.PUT, TEST)
                                .addNotExists(Method.DELETE, TEST)
                                .addNotExists(Method.POST, "/springcloud/tes")
                                .addNotExists(Method.POST, "/springcloud/testx")
                                .addNotExists(Method.POST, "/post")
                                .build()
                )
                .afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.POST, TEST)).build())
                .build();
    }

    private ShenYuScenarioSpec testWithMethodPut() {
        return ShenYuScenarioSpec.builder()
                .name("single-spring-cloud method PUT")
                .beforeEachSpec(
                        ShenYuBeforeEachSpec.builder()
                                .addSelectorAndRule(
                                        newSelectorBuilder("selector", Plugin.SPRING_CLOUD)
                                                .handle(SpringCloudSelectorHandle.builder().serviceId("springCloud-test")
                                                        .gray(true)
                                                        .divideUpstreams(DIVIDE_UPSTREAMS)
                                                        .build())
                                                .conditionList(Lists.newArrayList(
                                                        newCondition(Condition.ParamType.METHOD, Condition.Operator.EQUAL, "PUT"),
                                                        newCondition(Condition.ParamType.URI, Condition.Operator.EQUAL, TEST)
                                                ))
                                                .build(),
                                        newRuleBuilder("rule")
                                                .handle(SpringCloudRuleHandle.builder().loadBalance("hash").timeout(3000).build())
                                                .conditionList(Lists.newArrayList(
                                                        newCondition(Condition.ParamType.METHOD, Condition.Operator.EQUAL, "PUT"),
                                                        newCondition(Condition.ParamType.URI, Condition.Operator.EQUAL, TEST)
                                                ))
                                                .build()
                                )
                                .checker(notExists(Method.PUT, TEST))
                                .waiting(exists(Method.PUT, TEST))
                                .build()
                )
                .caseSpec(
                        ShenYuCaseSpec.builder()
                                .addExists(Method.PUT, TEST)
                                .addNotExists(Method.GET, TEST)
                                .addNotExists(Method.POST, TEST)
                                .addNotExists(Method.DELETE, TEST)
                                .addNotExists(Method.PUT, "/springcloud/tes")
                                .addNotExists(Method.PUT, "/springcloud/testt")
                                .addNotExists(Method.PUT, "/put")
                                .build()
                )
                .afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.PUT, TEST)).build())
                .build();
    }

    private ShenYuScenarioSpec testWithMethodDelete() {
        return ShenYuScenarioSpec.builder()
                .name("single-divide method DELETE")
                .beforeEachSpec(
                        ShenYuBeforeEachSpec.builder()
                                .addSelectorAndRule(
                                        newSelectorBuilder("selector", Plugin.SPRING_CLOUD)
                                                .handle(SpringCloudSelectorHandle.builder().serviceId("springCloud-test")
                                                        .gray(true)
                                                        .divideUpstreams(DIVIDE_UPSTREAMS)
                                                        .build())
                                                .conditionList(Lists.newArrayList(
                                                        newCondition(Condition.ParamType.METHOD, Condition.Operator.EQUAL, "DELETE"),
                                                        newCondition(Condition.ParamType.URI, Condition.Operator.EQUAL, TEST)
                                                ))
                                                .build(),
                                        newRuleBuilder("rule")
                                                .handle(SpringCloudRuleHandle.builder().loadBalance("hash").timeout(3000).build())
                                                .conditionList(Lists.newArrayList(
                                                        newCondition(Condition.ParamType.METHOD, Condition.Operator.EQUAL, "DELETE"),
                                                        newCondition(Condition.ParamType.URI, Condition.Operator.EQUAL, TEST)
                                                ))
                                                .build()
                                )
                                .checker(notExists(Method.DELETE, TEST))
                                .waiting(exists(Method.DELETE, TEST))
                                .build()
                )
                .caseSpec(
                        ShenYuCaseSpec.builder()
                                .addExists(Method.DELETE, TEST)
                                .addNotExists(Method.GET, TEST)
                                .addNotExists(Method.PUT, TEST)
                                .addNotExists(Method.POST, TEST)
                                .addNotExists(Method.DELETE, "/springcloud/tes")
                                .addNotExists(Method.DELETE, "/springcloud/testt")
                                .addNotExists(Method.DELETE, "/delete")
                                .build()
                )
                .afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.DELETE, TEST)).build())
                .build();
    }
    
    /**
verifier uri.
@param handle handle
@throws JsonProcessingException JsonProcessingException
shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-spring-cloud/src/test/java/org/apache/shenyu/e2e/testcase/springcloud/SpringCloudPluginCases.java