@ExceptionHandler(MethodArgumentNotValidException.class)
    protected ShenyuAdminResult handleMethodArgumentNotValidException(final MethodArgumentNotValidException e) {
        LOG.warn("method argument not valid", e);
        BindingResult bindingResult = e.getBindingResult();
        String errorMsg = bindingResult.getFieldErrors().stream()
                .map(f -> f.getField().concat(": ").concat(Optional.ofNullable(f.getDefaultMessage()).orElse("")))
                .collect(Collectors.joining("| "));
        return ShenyuAdminResult.error(String.format("Request error! invalid argument [%s]", errorMsg));
    }
@Test
    public void testHandleMethodArgumentNotValidException() throws InstantiationException, IllegalAccessException, NoSuchMethodException {
        BindingResult bindingResult = spy(new DirectFieldBindingResult("test", "TestClass"));
        MethodParameter methodParameter = spy(new SynthesizingMethodParameter(this.getClass().getMethod("setUp"), -1));
        MethodArgumentNotValidException exception = spy(new MethodArgumentNotValidException(methodParameter, bindingResult));

        when(exception.getBindingResult()).thenReturn(bindingResult);
        List<FieldError> fieldErrors = spy(Collections.emptyList());
        when(bindingResult.getFieldErrors()).thenReturn(fieldErrors);
        ShenyuAdminResult result = exceptionHandlersUnderTest.handleMethodArgumentNotValidException(exception);
        Assertions.assertEquals(result.getCode().intValue(), CommonErrorCode.ERROR);
        MatcherAssert.assertThat(result.getMessage(), containsString("Request error! invalid argument"));
    }