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

package com.azure.resourcemanager.reservations.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.reservations.models.ExchangeRequest;
import com.azure.resourcemanager.reservations.models.ExchangeRequestProperties;
import org.junit.jupiter.api.Assertions;

public final class ExchangeRequestTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ExchangeRequest model =
            BinaryData.fromString("{\"properties\":{\"sessionId\":\"d\"}}").toObject(ExchangeRequest.class);
        Assertions.assertEquals("d", model.properties().sessionId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ExchangeRequest model =
            new ExchangeRequest().withProperties(new ExchangeRequestProperties().withSessionId("d"));
        model = BinaryData.fromObject(model).toObject(ExchangeRequest.class);
        Assertions.assertEquals("d", model.properties().sessionId());
    }
}
