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

package com.azure.resourcemanager.billing.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.billing.fluent.models.AgreementInner;
import com.azure.resourcemanager.billing.models.Participants;
import java.util.Arrays;

public final class AgreementInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AgreementInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"agreementLink\":\"goo\",\"category\":\"Other\",\"acceptanceMode\":\"ClickToAccept\",\"billingProfileInfo\":{\"billingProfileId\":\"bvleorfmluiqtqzf\",\"billingProfileDisplayName\":\"yvnqqybaryeuay\",\"indirectRelationshipOrganizationName\":\"qabqgzslesjcb\"},\"effectiveDate\":\"2021-02-16T20:00:10Z\",\"expirationDate\":\"2021-04-10T08:53:01Z\",\"participants\":[{\"status\":\"w\",\"statusDate\":\"2021-08-27T00:56:15Z\",\"email\":\"bquwrbehw\"}],\"status\":\"o\"},\"id\":\"buffkmrqemvvhm\",\"name\":\"tdrjfutacoebj\",\"type\":\"ewzcjznmwcp\"}")
                .toObject(AgreementInner.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AgreementInner model = new AgreementInner().withParticipants(Arrays.asList(new Participants()));
        model = BinaryData.fromObject(model).toObject(AgreementInner.class);
    }
}
