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

package com.azure.resourcemanager.dataprotection.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.dataprotection.models.RetentionTag;
import org.junit.jupiter.api.Assertions;

public final class RetentionTagTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RetentionTag model =
            BinaryData
                .fromString("{\"eTag\":\"hyxxrwlycoduhpk\",\"id\":\"gymare\",\"tagName\":\"n\"}")
                .toObject(RetentionTag.class);
        Assertions.assertEquals("n", model.tagName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RetentionTag model = new RetentionTag().withTagName("n");
        model = BinaryData.fromObject(model).toObject(RetentionTag.class);
        Assertions.assertEquals("n", model.tagName());
    }
}
