@Test
    void commandExceptionShouldNotBeSwallowed() {
        // Arrange
        final CommandManager<TestCommandSender> commandManager = new CommandManager<TestCommandSender>(
                ExecutionCoordinator.<TestCommandSender>builder()
                        .parsingExecutor(ExecutionCoordinator.nonSchedulingExecutor()).build(),
                CommandRegistrationHandler.nullCommandRegistrationHandler()
        ) {
            @Override
            public boolean hasPermission(
                    final @NonNull TestCommandSender sender,
                    final @NonNull String permission
            ) {
                return true;
            }
        };

        final CustomException customException = new CustomException();

        commandManager.command(
                commandManager.commandBuilder("test")
                        .handler((context) -> {
                            throw customException;
                        })
                        .build()
        );

        // Act
        final CompletionException exception = assertThrows(
                CompletionException.class,
                () -> commandManager.commandExecutor().executeCommand(new TestCommandSender(), "test").join()
        );

        // Assert
        assertThat(exception).hasCauseThat().isInstanceOf(CommandExecutionException.class);
        assertThat(exception).hasCauseThat().hasCauseThat().isInstanceOf(CustomException.class);
    }
Test for https://github.com/Incendo/cloud/issues/281.
cloud-core/src/test/java/org/incendo/cloud/issue/Issue281.java