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

package com.azure.resourcemanager.communication.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.communication.fluent.models.SenderUsernameResourceInner;
import org.junit.jupiter.api.Assertions;

public final class SenderUsernameResourceInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SenderUsernameResourceInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"dataLocation\":\"jmvxie\",\"username\":\"uugidyjrrfby\",\"displayName\":\"svexcsonpclhoco\",\"provisioningState\":\"Running\"},\"id\":\"ev\",\"name\":\"eggzfb\",\"type\":\"hfmvfaxkffe\"}")
                .toObject(SenderUsernameResourceInner.class);
        Assertions.assertEquals("uugidyjrrfby", model.username());
        Assertions.assertEquals("svexcsonpclhoco", model.displayName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SenderUsernameResourceInner model =
            new SenderUsernameResourceInner().withUsername("uugidyjrrfby").withDisplayName("svexcsonpclhoco");
        model = BinaryData.fromObject(model).toObject(SenderUsernameResourceInner.class);
        Assertions.assertEquals("uugidyjrrfby", model.username());
        Assertions.assertEquals("svexcsonpclhoco", model.displayName());
    }
}
