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

package com.azure.resourcemanager.mariadb.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mariadb.models.NameAvailabilityRequest;
import org.junit.jupiter.api.Assertions;

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

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