// 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.ReservationToReturn;
import org.junit.jupiter.api.Assertions;

public final class ReservationToReturnTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ReservationToReturn model =
            BinaryData
                .fromString("{\"reservationId\":\"rxv\",\"quantity\":76468143}")
                .toObject(ReservationToReturn.class);
        Assertions.assertEquals("rxv", model.reservationId());
        Assertions.assertEquals(76468143, model.quantity());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ReservationToReturn model = new ReservationToReturn().withReservationId("rxv").withQuantity(76468143);
        model = BinaryData.fromObject(model).toObject(ReservationToReturn.class);
        Assertions.assertEquals("rxv", model.reservationId());
        Assertions.assertEquals(76468143, model.quantity());
    }
}
