def METHOD_NAME(self, mock_os_dir, mock_command):
    mock_os_dir.return_value = ['foo', 'bar']
    assert self.archive.create_xz_compressed('source-dir') == 'foo.tar.xz'
    mock_command.assert_called_once_with(
        [
            'bash', '-c',
            ' '.join([
                'tar', '-C', 'source-dir', '--xattrs',
                '--xattrs-include=*', '-c', '--to-stdout',
                'bar', 'foo', '|', 'xz', '-f', '--threads=0',
                '>', 'foo.tar.xz'
            ])
        ]
    )