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

package com.azure.resourcemanager.iothub.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupBodyDescription;
import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupName;
import org.junit.jupiter.api.Assertions;

public final class EventHubConsumerGroupBodyDescriptionTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        EventHubConsumerGroupBodyDescription model =
            BinaryData
                .fromString("{\"properties\":{\"name\":\"it\"}}")
                .toObject(EventHubConsumerGroupBodyDescription.class);
        Assertions.assertEquals("it", model.properties().name());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        EventHubConsumerGroupBodyDescription model =
            new EventHubConsumerGroupBodyDescription().withProperties(new EventHubConsumerGroupName().withName("it"));
        model = BinaryData.fromObject(model).toObject(EventHubConsumerGroupBodyDescription.class);
        Assertions.assertEquals("it", model.properties().name());
    }
}
