'A ``PathError`` is raised if the path given to
``RootCredential.initialize`` does not exist.'

def test_create_error_on_non_existent_path(self):

    path = FilePath(self.mktemp())
    e = self.assertRaises(PathError, RootCredential.initialize, path, 'mycluster')
    expected = 'Unable    to    write    certificate    file.    No    such    file    or    directory    {path}'.format(path=path.child(AUTHORITY_CERTIFICATE_FILENAME).path)
    self.assertEqual(str(e), expected)
