// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.mediaservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyTokenClaim;
import org.junit.jupiter.api.Assertions;

public final class ContentKeyPolicyTokenClaimTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ContentKeyPolicyTokenClaim model =
            BinaryData
                .fromString("{\"claimType\":\"cv\",\"claimValue\":\"uwrbehwagoh\"}")
                .toObject(ContentKeyPolicyTokenClaim.class);
        Assertions.assertEquals("cv", model.claimType());
        Assertions.assertEquals("uwrbehwagoh", model.claimValue());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ContentKeyPolicyTokenClaim model =
            new ContentKeyPolicyTokenClaim().withClaimType("cv").withClaimValue("uwrbehwagoh");
        model = BinaryData.fromObject(model).toObject(ContentKeyPolicyTokenClaim.class);
        Assertions.assertEquals("cv", model.claimType());
        Assertions.assertEquals("uwrbehwagoh", model.claimValue());
    }
}
