public static final CommandContext decode(String str) {
        CommandContext commandContext = null;
        if (!StringUtils.isBlank(str)) {
            str = str.trim();
            String[] array = str.split("(?<![\\\\]) ");
            if (array.length > 0) {
                String[] targetArgs = new String[array.length - 1];
                System.arraycopy(array, 1, targetArgs, 0, array.length - 1);
                String name = array[0].trim();
                if (name.equals("invoke") && array.length > 2) {
                    targetArgs = reBuildInvokeCmdArgs(str);
                }
                commandContext = CommandContextFactory.newInstance(name, targetArgs, false);
                commandContext.setOriginRequest(str);
            }
        }

        return commandContext;
    }
@Test
    void testDecode() throws Exception {
        CommandContext context = TelnetCommandDecoder.decode("test a b");
        assertThat(context.getCommandName(), equalTo("test"));
        assertThat(context.isHttp(), is(false));
        assertThat(context.getArgs(), arrayContaining("a", "b"));
    }