class ConvertingCommand implements ExecutableCommand {

    private final ConversionService conversionService;

    private final ExecutableCommand delegate;

    public ConvertingCommand(ConversionService conversionService, ExecutableCommand delegate) {
        this.conversionService = conversionService;
        this.delegate = delegate;
    }

    @Override
    public Object execute(Object[] parameters) throws ExecutionException, InterruptedException {<FILL_FUNCTION_BODY>}

    @Override
    public CommandMethod getCommandMethod() {
        return delegate.getCommandMethod();
    }

}


        Object result = delegate.execute(parameters);

        if (delegate.getCommandMethod().getReturnType().isAssignableFrom(result.getClass())) {
            return result;
        }

        return conversionService.convert(result, delegate.getCommandMethod().getReturnType().getRawClass());
    
<no_super_class>