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

package com.azure.resourcemanager.webpubsub.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.webpubsub.models.EventHubEndpoint;
import org.junit.jupiter.api.Assertions;

public final class EventHubEndpointTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        EventHubEndpoint model =
            BinaryData
                .fromString(
                    "{\"type\":\"EventHub\",\"fullyQualifiedNamespace\":\"qkvpuvksgplsakn\",\"eventHubName\":\"n\"}")
                .toObject(EventHubEndpoint.class);
        Assertions.assertEquals("qkvpuvksgplsakn", model.fullyQualifiedNamespace());
        Assertions.assertEquals("n", model.eventHubName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        EventHubEndpoint model =
            new EventHubEndpoint().withFullyQualifiedNamespace("qkvpuvksgplsakn").withEventHubName("n");
        model = BinaryData.fromObject(model).toObject(EventHubEndpoint.class);
        Assertions.assertEquals("qkvpuvksgplsakn", model.fullyQualifiedNamespace());
        Assertions.assertEquals("n", model.eventHubName());
    }
}
