def METHOD_NAME(self, mock_run):
    command_type = namedtuple('command', ['output'])
    mock_run.return_value = command_type(
        output="Dummy line\ncommand v1.2.3\n"
    )
    assert CommandCapabilities.check_version('command', (1, 2, 3))
    assert CommandCapabilities.check_version('command', (1, 1, 3))
    assert not CommandCapabilities.check_version('command', (1, 3))
    assert CommandCapabilities.check_version(
        'command', (1, 2, 3), version_flags=['-v']
    )
    assert CommandCapabilities.check_version(
        'command', (1, 2, 3), version_flags=['-v'], root='root_dir'
    )
    mock_run.assert_has_calls([
        call(['command', '--version']),
        call(['command', '--version']),
        call(['command', '--version']),
        call(['command', '-v']),
        call(['chroot', 'root_dir', 'command', '-v'])
    ])