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

package com.azure.resourcemanager.managementgroups.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.managementgroups.models.ParentGroupInfo;
import org.junit.jupiter.api.Assertions;

public final class ParentGroupInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ParentGroupInfo model =
            BinaryData
                .fromString("{\"id\":\"olniwpwcukjf\",\"name\":\"iawxklry\",\"displayName\":\"wckbasyypnd\"}")
                .toObject(ParentGroupInfo.class);
        Assertions.assertEquals("olniwpwcukjf", model.id());
        Assertions.assertEquals("iawxklry", model.name());
        Assertions.assertEquals("wckbasyypnd", model.displayName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ParentGroupInfo model =
            new ParentGroupInfo().withId("olniwpwcukjf").withName("iawxklry").withDisplayName("wckbasyypnd");
        model = BinaryData.fromObject(model).toObject(ParentGroupInfo.class);
        Assertions.assertEquals("olniwpwcukjf", model.id());
        Assertions.assertEquals("iawxklry", model.name());
        Assertions.assertEquals("wckbasyypnd", model.displayName());
    }
}
