def METHOD_NAME(capsys, mock_tools):
    """If an unexpected problem occurred accepting the license, warn the user."""
    mock_tools.subprocess.check_output.side_effect = subprocess.CalledProcessError(
        cmd=["/usr/bin/clang", "--version"],
        returncode=1,
    )
    # Check passes without an error...
    XcodeCliTools.confirm_xcode_license_accepted(mock_tools)
    # ... clang was invoked ...
    mock_tools.subprocess.check_output.assert_called_once_with(
        ["/usr/bin/clang", "--version"],
    )
    # ...but stdout contains a warning
    out = capsys.readouterr().out
    assert "************" in out