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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.AS2ErrorSettings;
import org.junit.jupiter.api.Assertions;

public final class AS2ErrorSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AS2ErrorSettings model =
            BinaryData
                .fromString("{\"suspendDuplicateMessage\":true,\"resendIfMDNNotReceived\":true}")
                .toObject(AS2ErrorSettings.class);
        Assertions.assertEquals(true, model.suspendDuplicateMessage());
        Assertions.assertEquals(true, model.resendIfMdnNotReceived());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AS2ErrorSettings model =
            new AS2ErrorSettings().withSuspendDuplicateMessage(true).withResendIfMdnNotReceived(true);
        model = BinaryData.fromObject(model).toObject(AS2ErrorSettings.class);
        Assertions.assertEquals(true, model.suspendDuplicateMessage());
        Assertions.assertEquals(true, model.resendIfMdnNotReceived());
    }
}
