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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.RepetitionIndex;
import org.junit.jupiter.api.Assertions;

public final class RepetitionIndexTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RepetitionIndex model =
            BinaryData.fromString("{\"scopeName\":\"bnw\",\"itemIndex\":524895743}").toObject(RepetitionIndex.class);
        Assertions.assertEquals("bnw", model.scopeName());
        Assertions.assertEquals(524895743, model.itemIndex());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RepetitionIndex model = new RepetitionIndex().withScopeName("bnw").withItemIndex(524895743);
        model = BinaryData.fromObject(model).toObject(RepetitionIndex.class);
        Assertions.assertEquals("bnw", model.scopeName());
        Assertions.assertEquals(524895743, model.itemIndex());
    }
}
