def METHOD_NAME(self):
    self.bucket.Versioning().enable()
    key2 = self.bucket.put_object(Key="mykey", Body=b"moredata")
    resp = self.client.get_object_attributes(
        Bucket=self.bucket_name, Key="mykey", ObjectAttributes=["ETag"]
    )
    headers = resp["ResponseMetadata"]["HTTPHeaders"]
    header_keys = set(headers.keys())
    assert "x-amz-version-id" in header_keys
    assert headers["x-amz-version-id"] == key2.version_id
    resp.pop("ResponseMetadata")
    assert set(resp.keys()) == {"ETag", "LastModified", "VersionId"}
    assert resp["VersionId"] == key2.version_id