public void matches(final SelectorDTO actual) throws JsonProcessingException, JSONException {
        String handle = actual.getHandle();
        if (Objects.nonNull(expected.getHandle())) {
            String expected = mapper.writer().writeValueAsString(this.expected.getHandle());
            JSONAssert.assertEquals(expected, handle, JSONCompareMode.LENIENT);
        } else {
            assertThat(actual, hasProperty("handle", isEmptyOrNullString()));
        }
        
        assertThat(actual, hasProperty("name", startsWith(expected.getName())));
        assertThat(actual, hasProperty("pluginId", equalTo(expected.getPlugin().getId())));
        assertThat(actual, hasProperty("type", equalTo(Integer.parseInt(expected.getType().getId()))));
        assertThat(actual, hasProperty("matchMode", equalTo(Integer.parseInt(expected.getMatchMode().getId()))));
        assertThat(actual, hasProperty("sort", equalTo(expected.getSort())));
        assertThat(actual, hasProperty("logged", equalTo(expected.isLogged())));
        assertThat(actual, hasProperty("enabled", equalTo(expected.isEnabled())));
        
        assertThat(actual, hasProperty("typeName", equalTo(expected.getType().alias())));
        assertThat(actual, hasProperty("matchModeName", equalTo(expected.getMatchMode().alias())));
        
        assertThat(actual, hasProperty("dateCreated", notNullValue()));
        assertThat(actual, hasProperty("dateUpdated", notNullValue()));
    }
match selector.
@param actual actual
@throws JsonProcessingException JsonProcessingException
@throws JSONException JSONException
shenyu-e2e/shenyu-e2e-client/src/main/java/org/apache/shenyu/e2e/matcher/SelectorMatcher.java