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

package com.azure.resourcemanager.advisor.generated;

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

public final class SuppressionContractInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SuppressionContractInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"suppressionId\":\"pk\",\"ttl\":\"odpuozmyzydag\",\"expirationTimeStamp\":\"2021-10-21T07:36:04Z\"},\"id\":\"xbezyiuokktwh\",\"name\":\"dxwzywqsmbsurexi\",\"type\":\"o\"}")
                .toObject(SuppressionContractInner.class);
        Assertions.assertEquals("pk", model.suppressionId());
        Assertions.assertEquals("odpuozmyzydag", model.ttl());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SuppressionContractInner model =
            new SuppressionContractInner().withSuppressionId("pk").withTtl("odpuozmyzydag");
        model = BinaryData.fromObject(model).toObject(SuppressionContractInner.class);
        Assertions.assertEquals("pk", model.suppressionId());
        Assertions.assertEquals("odpuozmyzydag", model.ttl());
    }
}
