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

package com.azure.resourcemanager.voiceservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.voiceservices.models.CheckNameAvailabilityRequest;
import org.junit.jupiter.api.Assertions;

public final class CheckNameAvailabilityRequestTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CheckNameAvailabilityRequest model =
            BinaryData
                .fromString("{\"name\":\"peqfpjkjl\",\"type\":\"fpdvhpfxxypi\"}")
                .toObject(CheckNameAvailabilityRequest.class);
        Assertions.assertEquals("peqfpjkjl", model.name());
        Assertions.assertEquals("fpdvhpfxxypi", model.type());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CheckNameAvailabilityRequest model =
            new CheckNameAvailabilityRequest().withName("peqfpjkjl").withType("fpdvhpfxxypi");
        model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class);
        Assertions.assertEquals("peqfpjkjl", model.name());
        Assertions.assertEquals("fpdvhpfxxypi", model.type());
    }
}
