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

public final class SplitPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SplitProperties model =
            BinaryData
                .fromString("{\"quantities\":[2062075015,1743077422],\"reservationId\":\"opjmcmatuokthfui\"}")
                .toObject(SplitProperties.class);
        Assertions.assertEquals(2062075015, model.quantities().get(0));
        Assertions.assertEquals("opjmcmatuokthfui", model.reservationId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SplitProperties model =
            new SplitProperties()
                .withQuantities(Arrays.asList(2062075015, 1743077422))
                .withReservationId("opjmcmatuokthfui");
        model = BinaryData.fromObject(model).toObject(SplitProperties.class);
        Assertions.assertEquals(2062075015, model.quantities().get(0));
        Assertions.assertEquals("opjmcmatuokthfui", model.reservationId());
    }
}
