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

package com.azure.resourcemanager.hdinsight.generated;

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

public final class NameAvailabilityCheckRequestParametersTests {
    @Test
    public void testDeserialize() {
        NameAvailabilityCheckRequestParameters model =
            BinaryData
                .fromString("{\"name\":\"rwr\",\"type\":\"rtwaenuuzko\"}")
                .toObject(NameAvailabilityCheckRequestParameters.class);
        Assertions.assertEquals("rwr", model.name());
        Assertions.assertEquals("rtwaenuuzko", model.type());
    }

    @Test
    public void testSerialize() {
        NameAvailabilityCheckRequestParameters model =
            new NameAvailabilityCheckRequestParameters().withName("rwr").withType("rtwaenuuzko");
        model = BinaryData.fromObject(model).toObject(NameAvailabilityCheckRequestParameters.class);
        Assertions.assertEquals("rwr", model.name());
        Assertions.assertEquals("rtwaenuuzko", model.type());
    }
}
