// 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.ReservationMergeProperties;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ReservationMergePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ReservationMergeProperties model =
            BinaryData
                .fromString("{\"mergeDestination\":\"tgrhpdjpjumas\",\"mergeSources\":[\"jpqyegu\"]}")
                .toObject(ReservationMergeProperties.class);
        Assertions.assertEquals("tgrhpdjpjumas", model.mergeDestination());
        Assertions.assertEquals("jpqyegu", model.mergeSources().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ReservationMergeProperties model =
            new ReservationMergeProperties()
                .withMergeDestination("tgrhpdjpjumas")
                .withMergeSources(Arrays.asList("jpqyegu"));
        model = BinaryData.fromObject(model).toObject(ReservationMergeProperties.class);
        Assertions.assertEquals("tgrhpdjpjumas", model.mergeDestination());
        Assertions.assertEquals("jpqyegu", model.mergeSources().get(0));
    }
}
