@Override
    public @NonNull LiteralCommandNode<S> createNode(
            final @NonNull String label,
            final @NonNull CommandNode<C> cloudCommand,
            final @NonNull Command<S> executor,
            final @NonNull BrigadierPermissionChecker<C> permissionChecker
    ) {
        final LiteralArgumentBuilder<S> literalArgumentBuilder = LiteralArgumentBuilder
                .<S>literal(label)
                .requires(this.requirement(cloudCommand, permissionChecker));

        this.updateExecutes(literalArgumentBuilder, cloudCommand, executor);

        final LiteralCommandNode<S> constructedRoot = literalArgumentBuilder.build();
        for (final CommandNode<C> child : cloudCommand.children()) {
            constructedRoot.addChild(this.constructCommandNode(child, permissionChecker, executor).build());
        }
        return constructedRoot;
    }
@Test
    void testAggregate() {
        // Arrange
        final Command<Object> command = this.commandManager.commandBuilder("command")
                .literal("literal")
                .required(
                        "aggregate",
                        AggregateParser.builder()
                                .withComponent("integer", integerParser(0, 10))
                                .withComponent("string", greedyStringParser())
                                .withDirectMapper(
                                        new TypeToken<Pair<Integer, String>>() {},
                                        (cmdCtx, ctx) -> Pair.of(ctx.<Integer>get("integer"), ctx.<String>get("string"))
                                )
                                .build()
                )
                .required("boolean", booleanParser())
                .build();
        this.commandManager.command(command);
        final com.mojang.brigadier.Command<Object> brigadierCommand = ctx -> 0;

        // Act
        final LiteralCommandNode<Object> commandNode = this.literalBrigadierNodeFactory.createNode(
                "command",
                command,
                brigadierCommand
        );

        // Assert
        assertThat(commandNode).isNotNull();
        assertThat(commandNode.getLiteral()).isEqualTo("command");
        assertThat(commandNode.isValidInput("command")).isTrue();
        assertThat(commandNode.getChildren()).hasSize(1);
        assertThat(commandNode.getCommand()).isNull();

        assertThat(commandNode.getChild("literal")).isNotNull();
        assertThat(commandNode.getChild("literal")).isInstanceOf(LiteralCommandNode.class);
        assertThat(commandNode.getChild("literal").getChildren()).hasSize(1);
        assertThat(commandNode.getCommand()).isNull();

        assertThat(commandNode.getChild("literal").getChild("integer")).isNotNull();
        assertThat(commandNode.getChild("literal").getChild("integer")).isInstanceOf(ArgumentCommandNode.class);
        final ArgumentCommandNode<Object, Integer> integerArgument = (ArgumentCommandNode<Object, Integer>)
                commandNode.getChild("literal").getChild("integer");
        assertThat(integerArgument.getName()).isEqualTo("integer");
        assertThat(integerArgument.getType()).isInstanceOf(IntegerArgumentType.class);
        assertThat(integerArgument.getType()).isEqualTo(IntegerArgumentType.integer(0, 10));
        assertThat(integerArgument.getChildren()).hasSize(1);
        assertThat(integerArgument.getCommand()).isNull();

        assertThat(integerArgument.getChild("string")).isNotNull();
        assertThat(integerArgument.getChild("string")).isInstanceOf(ArgumentCommandNode.class);
        final ArgumentCommandNode<Object, String> stringArgument = (ArgumentCommandNode<Object, String>)
                integerArgument.getChild("string");
        assertThat(stringArgument.getName()).isEqualTo("string");
        assertThat(stringArgument.getType()).isInstanceOf(StringArgumentType.class);
        assertThat(((StringArgumentType) stringArgument.getType()).getType())
                .isEqualTo(StringArgumentType.StringType.GREEDY_PHRASE);
        assertThat(stringArgument.getChildren()).hasSize(1);
        assertThat(stringArgument.getCommand()).isNull();

        assertThat(stringArgument.getChild("boolean")).isNotNull();
        assertThat(stringArgument.getChild("boolean")).isInstanceOf(ArgumentCommandNode.class);
        final ArgumentCommandNode<Object, Boolean> booleanArgument = (ArgumentCommandNode<Object, Boolean>)
                stringArgument.getChild("boolean");
        assertThat(booleanArgument.getName()).isEqualTo("boolean");
        assertThat(booleanArgument.getType()).isInstanceOf(BoolArgumentType.class);
        assertThat(booleanArgument.getChildren()).isEmpty();
        assertThat(booleanArgument.getCommand()).isEqualTo(brigadierCommand);
    }