public void AsOwner_MatchesOwnedBy() { var parent = new V1Pod() { ApiVersion = V1Pod.KubeApiVersion, Kind = V1Pod.KubeKind, Metadata = new V1ObjectMeta() { Name = "test", NamespaceProperty = "default", Uid = "my-uid", }, }; var child = new V1Pod(); child.AddOwnerReference(parent.AsOwnerReference()); Assert.True(child.IsOwnedBy(parent)); }