def METHOD_NAME(run_cli_command, monkeypatch):
    """Test all the information and cases of the storage maintain command."""
    from aiida.common.log import AIIDA_LOGGER
    from aiida.manage import get_manager
    storage = get_manager().get_profile_storage()
    def mock_maintain(*args, **kwargs):
        """Mocks for `maintain` method of `storage`, logging the inputs passed."""
        log_message = ''
        log_message += 'Provided args:\n'
        for arg in args:
            log_message += f' > {arg}\n'
        log_message += 'Provided kwargs:\n'
        for key, val in kwargs.items():
            log_message += f' > {key}: {val}\n'
        AIIDA_LOGGER.report(log_message)
    monkeypatch.setattr(storage, 'maintain', mock_maintain)
    # Not passing user input should cause the command to exit without executing `storage.mantain` and so the last
    # message should be the prompt to continue or not.
    result = run_cli_command(cmd_storage.storage_maintain, use_subprocess=False)
    message_list = result.output_lines
    assert message_list[-1] == 'Are you sure you want continue in this mode? [y/N]: '
    # Test `storage.mantain` with `--force`
    result = run_cli_command(cmd_storage.storage_maintain, parameters=['--force', '--compress'], use_subprocess=False)
    message_list = result.output_lines
    assert ' > full: False' in message_list
    assert ' > dry_run: False' in message_list
    assert ' > compress: True' in message_list
    # Test `storage.mantain` with user input Y
    result = run_cli_command(cmd_storage.storage_maintain, user_input='Y', use_subprocess=False)
    message_list = result.output_lines
    assert ' > full: False' in message_list
    assert ' > dry_run: False' in message_list
    assert ' > compress: False' in message_list
    # Test `storage.mantain` with `--dry-run`
    result = run_cli_command(cmd_storage.storage_maintain, parameters=['--dry-run'], use_subprocess=False)
    message_list = result.output_lines
    assert ' > full: False' in message_list
    assert ' > dry_run: True' in message_list
    # Test `storage.mantain` with `--full`
    result = run_cli_command(cmd_storage.storage_maintain, parameters=['--full'], user_input='Y', use_subprocess=False)
    message_list = result.output_lines
    assert ' > full: True' in message_list
    assert ' > dry_run: False' in message_list
    # Test `storage.mantain` with `--full` and `--no-repack`
    result = run_cli_command(
        cmd_storage.storage_maintain, parameters=['--full', '--no-repack'], user_input='Y', use_subprocess=False
    )
    message_list = result.output_lines
    assert ' > full: True' in message_list
    assert ' > do_repack: False' in message_list
    assert ' > dry_run: False' in message_list