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

package com.azure.resourcemanager.support.generated;

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

public final class CommunicationDetailsInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CommunicationDetailsInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"communicationType\":\"web\",\"communicationDirection\":\"outbound\",\"sender\":\"ugidyjrr\",\"subject\":\"byao\",\"body\":\"v\",\"createdDate\":\"2021-04-28T17:45:05Z\"},\"id\":\"sonpclhocohs\",\"name\":\"kevle\",\"type\":\"gz\"}")
                .toObject(CommunicationDetailsInner.class);
        Assertions.assertEquals("ugidyjrr", model.sender());
        Assertions.assertEquals("byao", model.subject());
        Assertions.assertEquals("v", model.body());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CommunicationDetailsInner model =
            new CommunicationDetailsInner().withSender("ugidyjrr").withSubject("byao").withBody("v");
        model = BinaryData.fromObject(model).toObject(CommunicationDetailsInner.class);
        Assertions.assertEquals("ugidyjrr", model.sender());
        Assertions.assertEquals("byao", model.subject());
        Assertions.assertEquals("v", model.body());
    }
}
