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

package com.azure.resourcemanager.hybridnetwork.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hybridnetwork.models.ImageReference;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class ImageReferenceTests {
    @Test
    public void testDeserialize() {
        ImageReference model =
            BinaryData
                .fromString(
                    "{\"publisher\":\"umasxazjpq\",\"offer\":\"gual\",\"sku\":\"xxhejjzzvd\",\"version\":\"gwdslfhotwm\",\"exactVersion\":\"npwlbjnpg\"}")
                .toObject(ImageReference.class);
        Assertions.assertEquals("umasxazjpq", model.publisher());
        Assertions.assertEquals("gual", model.offer());
        Assertions.assertEquals("xxhejjzzvd", model.sku());
        Assertions.assertEquals("gwdslfhotwm", model.version());
        Assertions.assertEquals("npwlbjnpg", model.exactVersion());
    }

    @Test
    public void testSerialize() {
        ImageReference model =
            new ImageReference()
                .withPublisher("umasxazjpq")
                .withOffer("gual")
                .withSku("xxhejjzzvd")
                .withVersion("gwdslfhotwm")
                .withExactVersion("npwlbjnpg");
        model = BinaryData.fromObject(model).toObject(ImageReference.class);
        Assertions.assertEquals("umasxazjpq", model.publisher());
        Assertions.assertEquals("gual", model.offer());
        Assertions.assertEquals("xxhejjzzvd", model.sku());
        Assertions.assertEquals("gwdslfhotwm", model.version());
        Assertions.assertEquals("npwlbjnpg", model.exactVersion());
    }
}
