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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.X12SchemaReference;
import org.junit.jupiter.api.Assertions;

public final class X12SchemaReferenceTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        X12SchemaReference model =
            BinaryData
                .fromString(
                    "{\"messageId\":\"jlxr\",\"senderApplicationId\":\"lozapeewchpxlk\",\"schemaVersion\":\"wk\",\"schemaName\":\"ziycslevufuztck\"}")
                .toObject(X12SchemaReference.class);
        Assertions.assertEquals("jlxr", model.messageId());
        Assertions.assertEquals("lozapeewchpxlk", model.senderApplicationId());
        Assertions.assertEquals("wk", model.schemaVersion());
        Assertions.assertEquals("ziycslevufuztck", model.schemaName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        X12SchemaReference model =
            new X12SchemaReference()
                .withMessageId("jlxr")
                .withSenderApplicationId("lozapeewchpxlk")
                .withSchemaVersion("wk")
                .withSchemaName("ziycslevufuztck");
        model = BinaryData.fromObject(model).toObject(X12SchemaReference.class);
        Assertions.assertEquals("jlxr", model.messageId());
        Assertions.assertEquals("lozapeewchpxlk", model.senderApplicationId());
        Assertions.assertEquals("wk", model.schemaVersion());
        Assertions.assertEquals("ziycslevufuztck", model.schemaName());
    }
}
