def METHOD_NAME(self, mock_exists, mock_env, mock_access):
    mock_env.return_value = '/usr/local/bin:/usr/bin:/bin'
    mock_exists.return_value = True
    assert Path.which('some-file') == '/usr/local/bin/some-file'
    mock_exists.return_value = False
    assert Path.which('some-file') is None
    mock_env.return_value = None
    mock_exists.return_value = True
    assert Path.which('some-file', ['alternative']) == \
        'alternative/some-file'
    mock_access.return_value = False
    mock_env.return_value = '/usr/local/bin:/usr/bin:/bin'
    assert Path.which('some-file', access_mode=os.X_OK) is None
    mock_access.return_value = True
    assert Path.which('some-file', access_mode=os.X_OK) == \
        '/usr/local/bin/some-file'
    assert Path.which('some-file', custom_env={'PATH': 'custom_path'}) == \
        'custom_path/some-file'
    assert Path.which(
        'some-file',
        custom_env={'PATH': 'custom_path'},
        root_dir='/root_dir'
    ) == '/root_dir/custom_path/some-file'