@Override
    public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
        return invoker.invoke(invocation);
    }
@SuppressWarnings("unchecked")
    @Test
    void testJavaException() {

        ExceptionFilter exceptionFilter = new ExceptionFilter();
        RpcInvocation invocation = new RpcInvocation(
                "sayHello", DemoService.class.getName(), "", new Class<?>[] {String.class}, new Object[] {"world"});

        AppResponse appResponse = new AppResponse();
        appResponse.setException(new IllegalArgumentException("java"));

        Invoker<DemoService> invoker = mock(Invoker.class);
        when(invoker.invoke(invocation)).thenReturn(appResponse);
        when(invoker.getInterface()).thenReturn(DemoService.class);

        Result newResult = exceptionFilter.invoke(invoker, invocation);

        Assertions.assertEquals(appResponse.getException(), newResult.getException());
    }