// 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.StreamingPolicyFairPlayConfiguration;
import org.junit.jupiter.api.Assertions;

public final class StreamingPolicyFairPlayConfigurationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        StreamingPolicyFairPlayConfiguration model =
            BinaryData
                .fromString("{\"customLicenseAcquisitionUrlTemplate\":\"tppjflcx\",\"allowPersistentLicense\":true}")
                .toObject(StreamingPolicyFairPlayConfiguration.class);
        Assertions.assertEquals("tppjflcx", model.customLicenseAcquisitionUrlTemplate());
        Assertions.assertEquals(true, model.allowPersistentLicense());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        StreamingPolicyFairPlayConfiguration model =
            new StreamingPolicyFairPlayConfiguration()
                .withCustomLicenseAcquisitionUrlTemplate("tppjflcx")
                .withAllowPersistentLicense(true);
        model = BinaryData.fromObject(model).toObject(StreamingPolicyFairPlayConfiguration.class);
        Assertions.assertEquals("tppjflcx", model.customLicenseAcquisitionUrlTemplate());
        Assertions.assertEquals(true, model.allowPersistentLicense());
    }
}
