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

package com.azure.resourcemanager.databox.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.databox.models.ContactInfo;
import org.junit.jupiter.api.Assertions;

public final class ContactInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ContactInfo model =
            BinaryData
                .fromString(
                    "{\"contactName\":\"o\",\"phone\":\"rq\",\"phoneExtension\":\"poczvyifqrvkdvjs\",\"mobile\":\"rm\"}")
                .toObject(ContactInfo.class);
        Assertions.assertEquals("o", model.contactName());
        Assertions.assertEquals("rq", model.phone());
        Assertions.assertEquals("poczvyifqrvkdvjs", model.phoneExtension());
        Assertions.assertEquals("rm", model.mobile());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ContactInfo model =
            new ContactInfo()
                .withContactName("o")
                .withPhone("rq")
                .withPhoneExtension("poczvyifqrvkdvjs")
                .withMobile("rm");
        model = BinaryData.fromObject(model).toObject(ContactInfo.class);
        Assertions.assertEquals("o", model.contactName());
        Assertions.assertEquals("rq", model.phone());
        Assertions.assertEquals("poczvyifqrvkdvjs", model.phoneExtension());
        Assertions.assertEquals("rm", model.mobile());
    }
}
