@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
    protected ShenyuAdminResult handleHttpRequestMethodNotSupportedException(final HttpRequestMethodNotSupportedException e) {
        LOG.warn("http request method not supported", e);
        StringBuilder sb = new StringBuilder();
        sb.append(e.getMethod());
        sb.append(
                " method is not supported for this request. Supported methods are ");
        Objects.requireNonNull(e.getSupportedHttpMethods()).forEach(t -> sb.append(t).append(" "));
        return ShenyuAdminResult.error(sb.toString());
    }
@Test
    public void testHandleHttpRequestMethodNotSupportedException() {
        String[] supportedMethod = new String[]{"POST", "GET"};
        HttpRequestMethodNotSupportedException exception = new HttpRequestMethodNotSupportedException("POST" + supportedMethod + "request method", Arrays.asList(supportedMethod));
        ShenyuAdminResult result = exceptionHandlersUnderTest.handleHttpRequestMethodNotSupportedException(exception);
        Assertions.assertEquals(result.getCode().intValue(), CommonErrorCode.ERROR);
        MatcherAssert.assertThat(result.getMessage(), containsString("method is not supported for this request. Supported methods are"));
    }