// 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.SenderUsernameProperties;
import org.junit.jupiter.api.Assertions;

public final class SenderUsernamePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SenderUsernameProperties model =
            BinaryData
                .fromString(
                    "{\"dataLocation\":\"th\",\"username\":\"vmezy\",\"displayName\":\"hxmzsbbzoggig\",\"provisioningState\":\"Failed\"}")
                .toObject(SenderUsernameProperties.class);
        Assertions.assertEquals("vmezy", model.username());
        Assertions.assertEquals("hxmzsbbzoggig", model.displayName());
    }

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