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

package com.azure.resourcemanager.costmanagement.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.costmanagement.models.NotificationProperties;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class NotificationPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        NotificationProperties model =
            BinaryData
                .fromString(
                    "{\"to\":[\"kghtpwijnh\",\"jsvfycxzbfvoowv\",\"vmtgjqppy\"],\"language\":\"tronzmyhgfi\",\"message\":\"sxkm\",\"regionalFormat\":\"a\",\"subject\":\"krrjrea\"}")
                .toObject(NotificationProperties.class);
        Assertions.assertEquals("kghtpwijnh", model.to().get(0));
        Assertions.assertEquals("tronzmyhgfi", model.language());
        Assertions.assertEquals("sxkm", model.message());
        Assertions.assertEquals("a", model.regionalFormat());
        Assertions.assertEquals("krrjrea", model.subject());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        NotificationProperties model =
            new NotificationProperties()
                .withTo(Arrays.asList("kghtpwijnh", "jsvfycxzbfvoowv", "vmtgjqppy"))
                .withLanguage("tronzmyhgfi")
                .withMessage("sxkm")
                .withRegionalFormat("a")
                .withSubject("krrjrea");
        model = BinaryData.fromObject(model).toObject(NotificationProperties.class);
        Assertions.assertEquals("kghtpwijnh", model.to().get(0));
        Assertions.assertEquals("tronzmyhgfi", model.language());
        Assertions.assertEquals("sxkm", model.message());
        Assertions.assertEquals("a", model.regionalFormat());
        Assertions.assertEquals("krrjrea", model.subject());
    }
}
