// 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.fluent.models.NameAvailabilityCheckResultInner;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class NameAvailabilityCheckResultInnerTests {
    @Test
    public void testDeserialize() {
        NameAvailabilityCheckResultInner model =
            BinaryData
                .fromString("{\"nameAvailable\":false,\"reason\":\"nrfdw\",\"message\":\"uhhziuiefozbhdm\"}")
                .toObject(NameAvailabilityCheckResultInner.class);
        Assertions.assertEquals(false, model.nameAvailable());
    }

    @Test
    public void testSerialize() {
        NameAvailabilityCheckResultInner model = new NameAvailabilityCheckResultInner().withNameAvailable(false);
        model = BinaryData.fromObject(model).toObject(NameAvailabilityCheckResultInner.class);
        Assertions.assertEquals(false, model.nameAvailable());
    }
}
